I’ve recently been involved with an Office 365 archiving pilot project to demonstrate the user experience and performance for a client to see if it met their requirements and noticed that while it was quite easy to move the archive mailbox from the on-prem Exchange database to O365, there did not seem to be a way to move the mailbox back to the on-prem Exchange. After failing to find instructions through search, I ended up calling Microsoft O365 support for assistance and what ended up being the solution was to use PowerShell. As I’m sure there will be others who find themselves in the same situation as I did, I thought it would be good to write this blog post to demonstrate the steps.
To move the mailbox from O365 to your on-prem Exchange, execute the following New-MoveRequest cmdlet replacing the unique parameters:
$cred = get-credential // Enter your On Premise Admin credential
New-MoverRquest -identity user@domain.com -remotehostname mail.domain.com -archiveonly -archivedomain “domain.com” -Outbound -remotearchivetargetdatabase “db1” -remotecredential $cred
Note the following parameters that need to be changed for your environment:
user@domain.com – replace with the user’s email address
mail.domain.com – your migration endpoint configured in Office 365
domain.com – your SMTP domain
db1 – the name of the on-prem archive database that this user’s archive will be moved to
Note that the above immediately begins the move and as with all move requests done on an on-prem Exchange, this move would fail if it encounters any corrupted items. Skipping corrupted items is the same as a regular on-prem Exchange move and to specify a threshold for corrupted items, use the parameter -BadItemLimit # where # is the amount of corrupted item threshold you would like to set.
Get-MoveRequest on its own or with the | FL parameter can be used to review the status of the mailbox move:
The Exchange Management Console and navigating to Office 365 > Recipient Configuration > Move Request can also be used for reviewing the status of the archive mailbox migration as such:
Continue to wait until the move is completed and you should be able to see that the on-prem Exchange archive database is specified as the user’s Archive database:
The on-prem Exchange Management Shell can also be used to confirm that the user’s archive mailbox database is now on-prem by executing:
Get-Mailbox -identity user@domain.com –archive | FL
Note that the ArchiveDatabase is listed as blank when the user’s archive mailbox is still on O365:
After the move, you should see that the field is now populated with the on-prem Exchange archive database:
Hope this will help anyone looking for off boarding an Office 365 Online Archive mailbox back onto their on-prem Exchange.
------------------------------------------------------------------------------------------------------------------------------------------------------------------
An additional note I’d like to make is if you would like to list all the archive mailboxes active on Office 365, execute the following cmdlet:
Get-MailUser | Where-Object {$_.ArchiveStatus -match "Active"} | fl DisplayName,*archive*