When you create a Teams meeting in Outlook for another user, you get the error:…
You already did move mailboxes from Exchange on-premises to Exchange Online. What if you want to move a mailbox back to Exchange on-premises? The term is also known as offboarding a mailbox from the cloud. One of the reasons you wish to offboard a mailbox is that applications are not Office 365 ready, and you have to move the mailbox from Exchange Online to on-premises. In this article, we will look at how to move mailbox from Office 365 to on-premises with PowerShell.
Table of contents
Before you start to move a mailbox from Exchange Online
The first step is to make sure to install and connect with Exchange Online PowerShell. When you are connected, go to the next part to find the remote server URL.
Good to know is that you are not pulling the mailbox from Exchange Online to on-premises. In fact, you are pushing the mailbox from Exchange Online to on-premises. That’s why you need to run the commands from Exchange Online PowerShell.
Find migration endpoint remote server URL
Get the remote server URL by using the Get-MigrationEndpoint cmdlet. Read more about how to find RemoteHostName URL for mailbox migration. The Hybrid Configuration Wizard created this migration endpoint. Copy the RemoteServer URL as you will need it in the next part.
PS C:\> Get-MigrationEndpoint | Format-List Identity, RemoteServer Identity : Hybrid Migration Endpoint - EWS (Default Web Site) RemoteServer : mail.exoip.com
Move mailbox from Exchange Online with PowerShell
Create a new move request from Exchange Online. Fill in the following details.
- -Identity: Mailbox name or email address
- -RemoteTargetDatabase: Exchange on-premises mailbox database
- -RemoteHostName: The remote server that you copied in the previous step
- -TargetDeliveryDomain: Primary SMTP domain used for the Exchange Online organization mailboxes
- -RemoteCredential: On-premises administrator account with privileges
After running the cmdlet, a credential sign-in request will show up. Fill in the password of the on-premises credentials (RemoteCredential).
PS C:\> Get-Mailbox -Identity "Jordy.Twin@exoip.com" | New-MoveRequest -OutBound -RemoteTargetDatabase "DB01" -RemoteHostName "mail.exoip.com" -TargetDeliveryDomain "exoip.com" -RemoteCredential (Get-Credential exoip\administrator)
Get the status of the mailbox move request by using the Get-MoveRequest cmdlet.
PS C:\> Get-MoveRequest -Identity "Jordy.Twin@exoip.com" | Get-MoveRequestStatistics | ft DisplayName,StatusDetail,TotalMailboxSize,TotalArchiveSize,PercentComplete DisplayName StatusDetail TotalMailboxSize TotalArchiveSize PercentComplete ----------- ------------ ---------------- ---------------- --------------- Jordy Twin Completed 231.6 MB (242,877,775 bytes) 0 B (0 bytes) 100
The mailbox will complete.
If that is not the case and you can’t complete the mailbox move request, you can suspend and resume the move request. It helps in most situations when you get a failed status. For example, the status detail TransientFailure.
Did this article help you to offboard the mailbox from Exchange Online to Exchange on-premises with PowerShell? I hope it did.
In this article, you learned how to move a mailbox from Exchange Online to on-premises. Connect to Exchange Online PowerShell and run the cmdlet as shown in the article. Keep an eye if the mailbox move from Exchange Online successfully completed.
Did you enjoy this article? You may also like Move mailbox to Exchange Online with PowerShell. Don’t forget to follow us and share this article.