Free Methods To Export Exchange Mailbox To Office 365

There are various methods to migrate from Exchange server to Office 365, depending on how many mailboxes you are exporting, their size and if you have any public folders in a migration plan. It’s quite easy to switch to Office 365 as all you need is to purchase the licenses (commonly used are Microsoft 365 Basic or Microsoft 365 Standard), create the users and assign the licenses, change the domain DNS, and start using them. However, the problem is how to export the data from Exchange and import it into Office 365 in the quickest way possible with no disruption to the users so that business is not affected.
 
You can first export the Exchange mailboxes to PST and then the PST file can be exported to Office 365 by using PowerShell, Exchange Admin Center (EAC) and Outlook. Let’s explore these three free methods to export Exchange mailboxes to Office 365.
 

Export by Using PowerShell

 
If you have Exchange Server 2010 with Service Pack 1 (SP1) or newer, you can use PowerShell to export mailboxes to PST. You need to open the Exchange Management Shell (EMS) window and type the command (as given below) to export a mailbox.
 
New-MailboxExportRequest -mailbox user1 -filepath \\myserver\sharedfolder\user1.pst
 
 
When exporting with PowerShell, you cannot use the direct path such as D:\pstfilelocation\user1.pst. You must use the full network path. For this to work, you must create a folder and share it with the user you are using to export and the Exchange Trusted SubSystem as full control on the folder and share.
 
 
Apart from that, you might need to check if the user you are using has the right permission. This can be done by adding the user to the export role from the Exchange Admin.
 
On the Exchange Admin Center, go to the Admin Roles under Permission and create a new role and assign the user to the role.

 
Once this is done, you can export the mailboxes to PST. You can use some filtering to granularly export from Exchange.
 
To include only a folder, you need to add -includefolder with the name of the folder in inverted commas. To export all the mailboxes, excluding a folder, you need to use the -excludefolder parameter. You can add multiple folders by separating them with commas. See the examples below.
 
New-MailboxExportRequest -Mailbox ‘user1’ -Filepath “\\SRV01\PSTFiles\User1.pst”-IncludeFolders “#Inbox#”, “#Outbox#”
New-MailboxExportRequest -Mailbox ‘user1’ -Filepath “\\SRV01\PSTFiles\User1.pst”-ExcludeFolders “#Drafts#”, “#Outbox#”
 
You can also filter the content by date by using the -ContentFilter parameter, with lt (less than) or gt (greater than).
 
With the lt parameter, you can specify a date limit to export everything which is less than the specified date (see the example below).
 
New-MailboxExportRequest -ContentFilter {(Received -lt '01/01/2018')} -Mailbox ‘User1’ -Filepath “\\SRV01\PSTFiles\User1.pst”
 
The gt parameter will export everything after the specified date.
 
New-MailboxExportRequest -ContentFilter {(Received -gt '01/01/2018')} -Mailbox ‘User1’ -Filepath “\\SRV01\PSTFiles\User1.pst”
 
You can have a combination of both content filters to export data of a specific period from the mailbox (see the below example).
 
New-MailboxExportRequest -ContentFilter {(Received -lt '01/01/2020') -and (Received -gt '01/01/2019')} -Mailbox ‘User1’ -Filepath “\\SRV01\PSTFiles\User1.pst”
 
Once the export process is started, you can monitor the status of export by using the below command. It isn’t elaborate but you would know the status as running, completed and failed.

 

 

Export by Using the Exchange Admin Center

 
To export with the Exchange Admin Center, you must have the pre-requisites such as permission on the user and share available with the correct security.
 
Once you open the Exchange Admin Center, follow the given steps,
  • Open the recipient’s section.
  • Click on more options.
  • Click on Export to a PST file. 
 
  • Select the mailbox to export and click Next.
  • In the next screen, enter the network path and the name of PST file for export.
 
  • On the next screen, you can tick the option to be notified by email and select the user who will be informed by email when the export is done. 

Export by Using Outlook

 
To export mailboxes to PST by using Outlook,
  • Click on Open & Export button under File and click on Import/Export. 
 
  • Click on Export to file, click next and then click on Outlook Data File (.PST).
You can see the full structure of the account.
  • Highlight the mailbox of the user and tick the Include subfolders option. Then click Next.
You can also choose to filter some items, by clicking on the Filter button.
 
 
You can also Migrate Exchange Server Mailboxes directly to Office 365. Read this article. 
 

Conclusion and Final Thoughts

 
Let’s start with the one which should be used as a last resort. Outlook would be unusable when exporting a large mailbox. You would need direct access to the user’s mailbox to do so. In addition, you would need to set the profile for each user which will take a considerate amount of time. For PowerShell, you would need to use scripting and you can easily make a mistake. Plus, you can only export one mailbox at a time. You can use scripting to go through all users, but it will hinder your Exchange performance. On the other hand, the GUI is nice but still with limitations of exporting one mailbox at a time, with no filtering. All these methods have one thing in common – they cannot export multiple mailboxes at once and cannot export public folders. The other thing is the above methods only work with an online mailbox database.