After a long and grueling setup of Hybrid Office 365 we were finally at a point where mailboxes were migrating, well test mailboxes were migrating. These test mailboxes had no mail in them and they were KB in size, however I was able to migrate on production mailbox (my own). A weekend passed and I was feeling pretty good about my project…until I tried to migrate the next batch. I started getting this transient error and couldn’t make heads or tails of it. I worked with Microsoft as a matter of fact I am still working with premier support. I thought things might once again crawl to a stop, which is about right for this project…however, I was willing to try one more thing. Migration requests and migration batches were new to 2013, and I was migrating from a 2010 server let’s try to the 2010 commands.
In Exchange 2010 you used a move request, and they kept those commands in 2013 and 2016. For some strange reason when we ran move requests, it worked flawlessly. Here are the commandlets. (remember when working with online mailboxes, you are using the UPN)
Test to see if mailbox migration will work
new-moverequest firstname.lastname@example.org -whatif
Moving a remote mailbox to Exchange Online
$onpremcred = get-credential
New-MoveRequest email@example.com -Remote -RemoteHostName hybrid.company.com -RemoteCredential $onpremcred -TargetDeliveryDomain company.mail.onmicrosoft.com -baditemlimits 10000
Let’s break this down
We’re requesting to move a mailbox of a particular user, the mailbox is remote and where the mailbox resides remotely is hybrid.company.com. The Remote credentials for the endpoint hybrid.company.com is stored in $onpremcred. We want the mailbox to be moved to company.mail.onmicrosoft.com. We have a corruption item limit of 10000 items.
To see how the mailbox is progressing you can use
You’ll notice in one of the mailboxes under the status detail you’ll see we have a stalleddueto… message, we can do some additional research on this by piping the previous command to a formatted list.
Get-MoveRequestStatistics firstname.lastname@example.org | fl
There you have it, this functionality saved me some time and allowed me to continue migrating mailboxes to Office 365 while I am working with Microsoft to resolve the transient errors and migration request failures.