Skip to content
onenote4exchange

Move a mailbox from Exchange on-premises to Exchange Online

Remote move migrations in an Exchange hybrid deployment: a single test mailbox first, then a batch from a CSV file.

1 min read

In an Exchange hybrid deployment, mailboxes move to Exchange Online with remote move migrations. Users keep their profile, and Outlook reconfigures itself after the move. This article assumes the Hybrid Configuration Wizard has already run and a migration endpoint exists.

Connect to Exchange Online PowerShell

Install-Module ExchangeOnlineManagement -Scope CurrentUser
Connect-ExchangeOnline -UserPrincipalName admin@contoso.com

List the migration endpoints created by the Hybrid Configuration Wizard:

Get-MigrationEndpoint | Format-Table Identity, EndpointType, RemoteServer

Start with one test mailbox

$cred = Get-Credential CONTOSO\migration.admin
New-MoveRequest -Identity test.user@contoso.com -Remote `
    -RemoteHostName mail.contoso.com `
    -TargetDeliveryDomain contoso.mail.onmicrosoft.com `
    -RemoteCredential $cred

Follow the progress:

Get-MoveRequest -Identity test.user@contoso.com | Get-MoveRequestStatistics |
    Format-List DisplayName, StatusDetail, PercentComplete, TotalMailboxSize

Move users in batches

Create a CSV file with one column, EmailAddress, then create the batch:

New-MigrationBatch -Name "Wave1-Finance" `
    -SourceEndpoint "Hybrid Migration Endpoint - EWS (Default Web Site)" `
    -TargetDeliveryDomain contoso.mail.onmicrosoft.com `
    -CSVData ([System.IO.File]::ReadAllBytes("C:\Migration\wave1.csv")) `
    -AutoStart

Without -AutoComplete, the batch syncs the mailboxes and then waits. Complete it during your planned cutover window:

Complete-MigrationBatch -Identity "Wave1-Finance"

Use the endpoint name returned by Get-MigrationEndpoint in your tenant; the name above is only an example.

After the move

  • Check the user in Outlook, Outlook on the web and on mobile.
  • Confirm free/busy and calendar sharing between cloud and on-premises users.
  • Keep the on-premises remote mailbox object: the user is now managed with Get-RemoteMailbox and Set-RemoteMailbox from on-premises.

Record each wave (batch name, users, dates, issues) on a OneNote page in your runbook. It becomes your migration journal.

  • #hybrid
  • #exchange-online
  • #migration
  • #powershell

Questions about this article or a project of your own?

Keep reading