Exchange online migration from an on-premise Exchange might be a simple task. You can use the web interface. It is amicable and easy to use, plus there is an option to import users via CSV, which made the bulk migration much easier. If you want to get the advanced settings and have much better flexibility, your path will always go to Powershell.

Exchange Online Migration Prerequisits

To Move

If you get any error related to a connection failure, make sure that you enable TLS 1.2. “Read the article from here.”
I will explain the possible scenarios for migration from On-premise to cloud:

  • Migrating only the primary User Mailbox (User doesn’t have Archive)
  • Migrating only Archive Mailbox and keep the primary On-premise
  • Migrate both User Primary Mailbox and the Archive Mailbox.

Assigning License To user

Before starting, make sure that the user/s have the proper license on M365, as the last thing you want, and after waiting for a long time to migrate a mailbox is a failure due to an un-assigned user license.
To confirm if the user has the required license, you can run the following command.

Import-Module msonline
Connect-MsolService # you will get the login page
(Get-MsolUser -UserPrincipalName test-it@mydomain.com).Licenses

You can check the license assigned to your tenant by using Get-MsolAccountSku.

Migrate Exchange Online (Primary and Archive)

Getting the Migration EndPoint, we need to run the Get-MigrationEndpoint (Exchange Online)

Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline #You will get a popup to type your username and password, make sure you are using the Global Admin account
(Get-MigrationEndpoint).RemoteServer

The Output should be something like this.

If you have multiple migration endpoints, then write down the one you want and use. But for this tutorial, there is only one migration endpoint.

New-MoveRequest -Identity "User Name" -RemoteHostName (Get-MigrationEndpoint).RemoteServer -Remote -TargetDeliveryDomain "mytenant.mail.onmicrosoft.com" -RemoteCredential (Get-Credential)

RemoteHostName: can be replaced with the saved GUID we saved earlier.
TargetDeliveryDomain: is your tenant mail name Domain
RemoteCredential, even it’s called remote, but it’s your on-premise Exchange credentials.
SuspendWhenReadyToComplete: even I did not use it in the previous command, but you can use this parameter to enable suspending the migration on completion. You can change this value even after the migration started by using the command.

Get-MoveRequest MyMoveRequest | Set-MoveRequest -SuspendWhenReadyToComplete $false/$true

You need to wait until the process is finished; you can monitor the progress by typing.

Get-MoveRequest MyMoveRequest | Get-MoveRequestStatistics | select Identity, Status, TotalMailboxSize

Moving Only Archive Mailbox and Keep the Primary on-premise

This is a cool feature as you can use the Exchange online as storage for old emails that fall under your configured retention policy. But make sure that you configure your AD Connect for Seamless SSO Authentication so users won’t need to type their password every time they open outlook.

To only move the Archive Mailbox (not the primary), all that you need is to add -ArchiveOnly to your new-moverequest.

New-MoveRequest -Identity MyUser -RemoteHostName (Get-MigrationEndpoint).remoteserver -TargetDeliveryDomain "mytenantname.mail.onmicrosoft.com" -RemoteCredential (Get-Credential) -Remote -ArchiveOnly

We can confirm this by using the following command

 Get-MoveRequest MyUser | select Flags

The output will be

Move only the primary Mailbox to Exchange Online

Moving the primary mailbox used if you already move the archive mailbox to Exchange Online and later on, you want to move the primary email to the cloud. Please note that till the date of writing this post, having the Primary Mailbox on cloud and the Archive on-premise is not supported.

Just like the -ArchiveOnlyBut in this case, you can use -PrimaryOnly

New-MoveRequest -Identity MyUser -RemoteHostName (Get-MigrationEndpoint).remoteserver -TargetDeliveryDomain "mytenantname.mail.onmicrosoft.com" -RemoteCredential (Get-Credential) -Remote -PrimaryOnly

if we checked the Move-request Flags

I hope this post gives you a clear and nice idea about migration to Exchange Online. If so, let me know in the comments.

5/5 - (1 vote)