How To: Migrate On Premises Exchange Mailbox data to an Office 365 Mailbox

Detailed Description

This How To will provide steps how the content of an On Premises Microsoft Exchange Mailbox can be migrated to an Office 365 Exchange Mailbox using the Simply Migrate Management Shell.
To ensure permissions have been correctly set, please follow the steps outlined in the following article;
Microsoft Office 365 and Microsoft Exchange Permissions

Create Job

Creating a job to migrate on premise Exchange to Office 365, the following cmdlet syntax is used.

PS C:\Program Files\Simply Migrate> New-SMJob -Source Exchange -SourceInput -SourceOptions UseStream,Ex2010sp2 -SourceEwsUrl '' -SourceCredential $SrcCreds -Target Exchange -TargetOutput -TargetOptions UseStream,Ex2016 -TargetCredential $TargCreds -TargetEwsUrl (Get-SmDefaultO365EwsUrl) -BatchId 1 -Tags "Mailbox Moves"

Description of parameters used;

But I have thousands to do ...

Do you know what is cooler than migrating one mailbox? Migrating thousands of mailboxes!
While there are many different ways to achieve this, below, we will show a simple approach using a CSV file with following information enclosed :


… and so on.
On to a script to process all of the users in that CSV.

# get the content of the CSV (Your header columns are as per the above example of SourceMailbox,TargetMailbox
$users = Import-Csv -Path c:\temp\users.csv

#Grab the source and taarget credentials.
$SourceCredentials = Get-Credential -UserName
$TargetCredentials = Get-Credential -UserName

foreach ($user in $users)
New-SMJob -Source Exchange -SourceInput $($user.SourceMailbox) -SourceOptions UseStream,Ex2010sp2 -SourceEwsUrl '' -SourceCredential $SourceCredentials -Target Exchange -TargetOutput $($user.TargetMailbox) -TargetOptions UseStream,Ex2016 -TargetCredential $TargetCredentials -TargetEwsUrl (Get-SmDefaultO365EwsUrl) -BatchId 1 -Tags "Mailbox Moves"

Once you run the above script, it will prompt you for the source and target credentials and create the jobs. You’re ready to start processing.

As a closing note, I will address the fact that these examples are migrating the user mailbox NOT the user Online Archive Mailbox.  If you wish to migrate the users Online Archive Mailboxes instead of their primary mailboxes, you can add UseArchive to the SourceOptions and TargetOptions in the above examples, and that will perform the migration of the Online Archive Mailboxes.