Wednesday, December 12, 2018

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

1. MS Blog: https://docs.microsoft.com/en-us/office365/enterprise/powershell/connect-to-office-365-powershell

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 https://outlook.office365.com/powershell-liveid/ -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:

Bruce_Lee@insomniacloud.com                      Final2-12.12.2018              Failed


PS C:\Windows\system32> Remove-MigrationUser Bruce_Lee@insomniacloud.com

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



Reference Blogs:
https://docs.microsoft.com/en-us/powershell/exchange/exchange-online/connect-to-exchange-online-powershell/connect-to-exchange-online-powershell?view=exchange-ps

https://glazenbakje.wordpress.com/2013/12/04/exchange-2013-remove-complete-moverequest-list-via-powershell/

http://www.expta.com/2015/08/exchange-2013-migration-batch-completes.html

https://practical365.com/exchange-server/completing-individual-move-requests-migration-batch/

https://vkarps.wordpress.com/2017/04/05/o365-exchange-one-liners/



Share: