Migrating mailboxes back to onprem

Sometimes, just sometimes you have to move them back. I experienced this the other night when a friend and colleague migrated a room mailbox and the room device we had wouldn’t connect to it. We didn’t have the proper time allotted to troubleshoot the issue so we had to migrate back, only I had forgotten to get the script to migrate it back. So I had to reverse engineer my previous script abit and managed to put something together quickly that works…Normally I have all of this sorted and on paper before I start a project, so this is a lesson in planning as well.

The syntax of the commandlet is like this

Get-Mailbox -Identity “user@company.com” | New-MoveRequest -Outbound -RemoteTargetDatabase “DatabaseName” -RemoteHostName hybrid.company.com -RemoteCredential $onpremcredentials -TargetDeliveryDomain “domain.com”

However, don’t forget to remove the previous move request, even though it’s been completed or you will see something like this.

The commandlet to remove a move request is Remove-MoveRequest “user@company.com”

You’ll notice the mailbox in Exchange is no longer a Remote Mailbox, and it’s back to a User Mailbox. So those are the commandlets to move a mailbox back. I’d recommend to have this all documented beforehand. Try to plan out as many scenarios as you can, and if nothing else you build yourself a nice library of how to’s.

 

 

Leave a comment

Your email address will not be published.


*