Wednesday, December 12, 2018

How to Remove a Failed Move Request for the Current Batch of Exchange 2013 to Office 365

1. MS Blog:

2. Open Powershell as an Administrator and install the AzureAD Powershell Modules on your Windows 10 machine.

3.  Install-Module -Name AzureAD (Doesn't seem to work on W2012 R2 Server)

4. Login with your Office365 Account (You have to be a Global admin). Type in Connect-AzureAD

5. After you type in the password you will get this screen:

6. Connect to Office 365 through PowerShell from the elevated prompt on your local Windows 10 Machine.

PS C:\Windows\system32> $UserCredential = Get-Credential

7. Sign-in to Office 365 with Administrator Account

8. Run this command so that you are connected via PowerShell (no there is no GUI):

PS C:\Windows\system32> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection

9. Turn off the pain in the neck prompts:

PS C:\Windows\system32> Import-PSSession $Session -DisableNameChecking

10. Check your batch that is migrating:

PS C:\Windows\system32> Get-MigrationBatch | fl

11. Get your Move Request (See what's failed)

PS C:\Windows\system32> Get-MoveRequest

12.  Remove the Completed Jobs (Optional):

PS C:\Windows\system32> Get-MoveRequest -movestatus completed | remove-moverequest

13. Delete all of them:

PS C:\Windows\system32> Get-MoveRequest -MoveStatus Failed | Remove-MoveRequest

14. Delete one at a time.

PS C:\Windows\system32> Get-MigrationUser

Kill the failed jobs:                      Final2-12.12.2018              Failed

PS C:\Windows\system32> Remove-MigrationUser

Are you sure you want to perform this action?
Remove the migration user ""?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [?] Help (default is "Y"): A

Reference Blogs: