Recently I encountered the following error when completing a mailbox move from Exchange to Office 365.
8/1/2015 12:00:00 AM [CY1PR11MB0001] Fatal error MrsHttpUnauthorizedException has occurred.
The initial sync had worked fine. The mailbox was AutoSuspended at 95%. It was ready to be completed. Yet, it did not want to go. I repeated a Resume-MoveRequest on a similar mailbox–same exact error.
Sadly, the interwebs seemed devoid of any real information. Luckily a good friend and colleague alerted me to the root cause. This error will occur if the password has changed on the account used to create the move request.
In my case, this had indeed happened.
The remedy for MrsHttpUnauthorizedException
To fix the issue we need to update the credentials on the move request. To do this we need to enlist the help of the Set-MoveRequest cmdlet. Let’s get started.
First, we need to store our new credentials in a variable.
C:\> $creds = Get-Credential
Next, we need to pass our new credentials to the Set-MoveRequest cmdlet. In this example, we are changing the credentials on a single move request.
C:\> Set-MoveRequest -Identity "Pond, Amy" -RemoteCredential $creds
Now we can resume our move for Amy.
C:\> Resume-MoveRequest -Identity "Pond, Amy"
At this point, our move request will complete successfully for Amy’s mailbox.
Bulk fixes
What if we want to fix the credentials for more than one move request? With the power of the pipe, this task is effortless.
For example, if we want to fix this on any move requests with a status of failed we could pipe it as follows:
C:\> Get-MoveRequest -MoveStatus failed | Set-MoveRequest -RemoteCredential $creds
Perhaps we want to change the credentials for all move requests, regardless of status.
C:\> Get-MoveRequest | Set-MoveRequest -RemoteCredential $creds
Or maybe we want to just change the credentials for a specific batch.
C:\> Get-MoveRequest -BatchName "Users A-H" | Set-MoveRequest -RemoteCredential $creds
As you can see, piping Get- into Set- saves a lot typing.
For more information on the Set-MoveRequest cmdlet, check this article.
Have you run into this before? This issue was a first for me. Drop a comment and let me know.
Fantastic! Thank you for this!
Glad to be of assistance. Be sure to check the rest of the site!