| | | |

Exchange TIP: How to Migrate Mailbox from Exchange Online to Exchange OnPrem

Exchange TIP: How to Migrate Mailbox from Exchange Online to Exchange OnPrem

In this quick post, I will go through a quick PowerShell I use to migrate a mailbox from Exchange Online back to Exchange Onprem.

Let’s first start by connecting to Exchange Online PowerShell.

Text

Description automatically generated

Once connected run the following:

Before we can run the below cmdlets, we need to understand what additional parameters are needed for the MoveRequest.

  • Identity: this is the mailbox that we need to move back to onprem
  • RemoteTargetDatabase: This is the database on the remote server, your onprem exchange server database.
  • RemoteHostName: This is the public FQDN used during your hybrid setup. Example mail.thatlazyadmin.com
  • TargetDeliveryDomian: This is your primary smtp domain used.

We will start the process by specifying an account that has admin permissions on Exchange Onprem.

$rmcred = get-credential thatlazyadmin\yoda

Text

Description automatically generated

Next, we can run the rest of the PSH, which includes the move request.

Get-Mailbox -Identity user@thatlazyadmin.com | New-MoveRequest -OutBound -RemoteTargetDatabase ‘DB001’ -RemoteHostName ‘mail.thatlazyadmin.com’ -RemoteCredential $rmcred -TargetDeliveryDomain ‘thatlazyadmin.com’

To view the status of a move request run the following: MoveRequest Statistics which will include the move request percentage so you can get an indication of how far the move is from being completed.

Get-MoveRequest "Journaling O365 Mailbox" |Get-MoveRequestStatistics

Text

Description automatically generated

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *