logo
logo
Sign in

Step-by-Step: Migrate Exchange from On-Premises to Office 365

avatar
Rajan Singh
Step-by-Step: Migrate Exchange from On-Premises to Office 365

Due to increasing cyberattacks on on-premises Exchange servers, many organizations have either migrated to cloud-based Office 365 or are in the process of doing so. This shift has been witnessed recently due to ransomware attacks on-premises Exchange server by a threat group named HAFNIUM. Although Microsoft releases security updates to counter such attacks, on premises Exchange servers are still vulnerable to various malicious attacks, physical damage, hardware or software failure, etc.

On the other hand, Office 365 or Exchange Online offers better security features. It also provides greater scalability and is more cost-effective in a longer run. In this guide, we help you migrate mailboxes from Exchange on-premises version to Office 365 with step-by-step process.

How to Migrate Exchange from On-Premises to Office 365?

To migrate Exchange on-premises to Office 365, you have five different methods:

  1. Cutover Migration
  2. Staged Migration
  3. Hybrid Deployment
  4. PST Upload
  5. EDB to Office 365 Migration Software

The first three methods are specific and do not work with all Exchange versions. In this guide, we will discuss the PST upload method to migrate mailboxes from Exchange 2010, 2013, 2016, or 2019 to Office 365.

To begin with the PST upload method, you need to first export the mailboxes from Exchange on-premises server database (EDB) to PST format. For this, you can use either Exchange Management Shell (EMS) or Exchange Admin Center (EAC).

After exporting the mailboxes from Exchange, you can upload the PST to the mailbox on Office 365. However, this involves multiple steps and may take longer. Also, it requires some level of expertise with Exchange Management Shell and Exchange Admin Center to perform the migration.

To overcome these limitations and migrate Exchange to Office 365 quickly and easily, you can use an Exchange on-premises to Office 365 migration tool, such as Stellar Converter for EDB. The EDB to PST software allows you to extract mailboxes from offline Exchange database file (.edb) and exports them to Office 365 mailboxes directly. It also auto-maps the source and destination mailboxes, which makes your Exchange to Office 365 migration job much easier. It uses parallel processing technique and thus, migrates up to 4 mailboxes simultaneously. This can help you minimize the downtime and quickly restore mailbox connectivity.

Steps to migrate Exchange on-premises to Office 365 via PST method are as follows:

Step 1: Assign Mailbox Import Export Role

To export mailboxes from Exchange on-premises server database to PST, Mailbox Import Export role should be assigned to the user account, which will be used to export the mailboxes via Exchange Admin Center (EAC) or Exchange Management Shell (EMS). The Mailbox Import Export Role is not assigned to any user by default, including Administrator.

The command to assign the Mailbox Import Export role using Exchange Management Shell is as follows:

New-ManagementRoleAssignment –Role "Mailbox Import Export" –User AdminUserName

You can change the AdminUserName with any user name to assign this role.

Step 2: Create Mailbox Export Request to Export Exchange Mailboxes to PST

You may use EAC or EMS to create mailbox export request and export the mailboxes from Exchange database to PST.

The EAC provides a graphical user interface, which makes it easier to export mailboxes to PST at a defined UNC path. However, it offers limited export options and you can’t export multiple mailboxes at once.

With EMS, you can use the New-MailboxExportRequest PowerShell cmdlet with parameters to create batch mailbox export request, add filters, and have more control over mailbox export requests.

To export Exchange mailbox to PST, launch EMS and enter the following command:

New-MailboxExportRequest -Mailbox Nancy.J -FilePath \EXCHSRV\File1.pst

This will create a single mailbox export request.

To create batch export request, enter the following command in the EMS:

$Export = get-mailbox; $Export|%{$_|New-MailboxExportRequest -FilePath \\EXCHSRV\PST\$($_.alias).pst}

To check the status of export request, you can use the Get-MailboxExportRequest cmdlet.

Get-MailboxExportRequest -Name MailboxExport | fl

To know more, consult our article on New-MailboxExportRequest PowerShell cmdlet. This will help you understand various parameters you can use to export mailboxes, including Archive Mailboxes, from Exchange on-premises to PST.

Step 3: Upload Exported PSTs to Office 365

To upload the Exchange mailbox PST file to Office 365, you need to assign the Mailbox Import Export role to the user account that you will use for uploading the PST file(s) to Office 365. The process is same, open the EMS and enter the following command:

New-ManagementRoleAssignment –Role "Mailbox Import Export" –User AdminUserName

Change AdminUserName with the user name to whom you want to assign the role.

Then follow the below steps to upload the Exchange Mailbox PST file to Office 365.

  • Open Office 365 and login to Admin Center.
  • Navigate to Compliance > Information governance > Import.
  • Click Import PST Files > New Import Job and then provide a name. Click ‘’
  • Click Upload Your Data > Next and then click Show Network Upload SAS URL. Copy this SAS URL anywhere, such as Notepad.
  • Now download, install, and launch the Azure Storage Explorer tool on your system.
  • Right-click on Storage Accounts and choose Connect Azure storage…
  • Choose the Use a shared access signature (SAS) URI and click ‘Next.’
  • Now paste that SAS URI from Notepad to the URI section and click Next > Connect
  • Click ‘Upload > Upload Files…
  • Click theicon and choose the Exchange Mailbox PST file that you’ve exported via EAC or EMS.
  • Choose a Destination directory on your Office 365 storage and click ‘’ This will save the PST file from your local system to Office 365 directory.
  • Now create a CSV file using MS Excel (refer to the screenshot below). This CSV file is used to map the uploaded PST file to the desired Office 365 mailbox account. Thus, ensure all details are correct.
  • Now go back to the Import data screen, enable or check both options and click Next.
  • Then click Select Mapping file to upload the CSV file. To verify, click Validate and then click Save.
  • Once done, click ‘Close’ and then ‘Refresh.’
  • Right-click or use double-click to open the job details and then click the ‘Import to Office 365’ button.
  • Choose ‘No, I want to import everything’ and then click ‘Next.’
  • Click ‘Import data’ to complete the PST import process.

This completes the mailbox migration from Exchange on-premises version to Office 365. Repeat the steps to import more mailboxes or upload all PST files at once and create a CSV file with all mailbox details to migrate PST mailboxes in bulk.

For more help or queries, reach us via comments down below.

collect
0
avatar
Rajan Singh
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more