How to Export Exchange 2016 Mailboxes to PST – PowerShell

Summary: In this guide, you will learn to export Exchange 2016 mailboxes to PST using the PowerShell commands. We will use the New-MailboxExportRequest cmdlet in Exchange Management Shell (EMS), which is built on top of PowerShell. Also, an advanced method to convert Exchange mailboxes to PST with an option to directly export mailboxes from Exchange database to a Live Exchange server or Office 365 account.

Why Export Exchange 2016 to Outlook PST?

PST or Personal Storage Table, also known as ‘Personal Folder’, is a format which is widely supported and can be easily imported to any Outlook account. This makes exporting Exchange 2016 mailboxes to PST an ideal backup option.

Besides backup, PST also helps in seamless migration of mailboxes from one user to another.

Steps to Export Exchange 2016 Mailboxes to PST using PowerShell Commands

To export Exchange 2016 mailboxes to PST, you can use the New-MailboxExportRequest PowerShell cmdlet or an EDB to PST Converter software such as Stellar Converter for EDB. By using New-MailboxExportRequest cmdlet, you can manually create mailbox export request to export either single or multiple mailboxes at once. You may also add filter to the mailbox export request. However, you can’t see any export progress and won’t know if the export request you created exported the PST successfully or not as the request are created via Exchange Management Shell (Command Line Interface). On the other hand, Stellar Converter for EDB software features graphical user interface which makes it easy to export PST from EDB file. The software extracts and saves mailboxes from both online and offline EDBs to PST format at you desired location in a few clicks. You can download the demo version for free and try it yourself,

However, this option is available only in on-premises Exchange Server 2016. Also, to execute New-MailboxExportRequest cmdlet, the user should be assigned with Mailbox Import Export role.

To assign the Mailbox Import Export role to a user, open Exchange Management Shell (EMS) and enter the following command as an administrator,

New-Managementroleassignment –Role “Mailbox Import Export” –User “UserName”

To check if the Mailbox Import Export role is assigned successfully, enter following command in the EMS window,

Get-ManagementRoleAssignment -Role “Mailbox Import Export” | Format-List RoleAssigneeName

Once the role is assigned successfully, you can execute the New-MailboxExportRequest cmdlet to export Exchange 2016 mailboxes to PST files.

PowerShell Commandsto Export Exchange 2016 Mailbox To Outlook PST

Below are the commands to backup Exchange mailboxes to PST based on various scenarios. You can also create multiple export request at once. However, each mailbox export request should have a unique name. Follow the one that meets your backup needs.

NOTE:By default, Microsoft generates 10 unique names and thus, you can create upto 10 export requests without providing a unique name. If you need to request more than 10 mailbox export requests, you must create unique name while requesting mailbox export.

1.      Export Exchange 2016 Mailbox to PST in Shared Folder

You can export a user’s primary mailbox data to PST file and store it on an Exchange Server’s shared folder. If a shared folder doesn’t exist, create one using the Exchange Admin Center (EAC). Also, ensure read/write permissions. Then execute the following command,

New-MailboxExportRequest -Mailbox Thomson -FilePath “\\SERVER22\MyNetworkPST\Thomson_Recovered.pst”

Thomson is the primary mailbox user, MyNetworkPST is a network shared folderon Exchange server named SERVER22.

2. Export User’s Archive to PST

To export a user’s archive to PST in Exchange 2016, enter the following command in the EMS.

New-MailboxExportRequest -Mailbox Thomson -FilePath “\\SERVER22\MyNetworkPST\Thomson_Archive.pst” –IsArchive

This command exports Thomson’s archive to PST file on MyNetworkPST network shared folder located on Exchange Server SERVER22.

3.      Export Exchange Mailbox to PST by Applying Filter

If you want to export and backup only certain mailbox items to PST, you can make use of filters while creating a mailbox export request. By adding –ContentFilter parameter in the New-MailboxExportRequest cmdlet, you can export mailbox messages based on date,keyword matches, etc.

In the following example, ‘target‘ and ‘sales‘ are the keywords we look for in the body of the message for Thomson user mailbox received before May 2, 2015.

New-MailboxExportRequest -Mailbox Thomson -ContentFilter {(body -like “*target*”) -and (body -like “*sales*”) -and (Received -lt “02/05/2015”)} -FilePath \\SERVER22\MyNetworkPST\Thomson_MyCompanyReports.pst

4.      Export All Mailbox Items on Exchange 2016 to PST

Finally, if you wish to export all mailbox items from a mailbox on Exchange 2016, enter the following command in the Exchange Management Shell (EMS)

New-MailboxExportRequest -Mailbox Thomson -IncludeFolders “#Inbox#” -FilePath \\SERVER22\MyNetworkPST\Thomson\ThomsonData.pst

The command exports all the Thomson mailbox messages and folders to the PST file ThomsonData.pst.

5. Export All Mailboxes to Corresponding PST

In case you want to back up all the mailboxes in your organisation that resides on the Exchange 2016 server, use these commands in EMS.

Get-Mailbox

The above command lists all the mailboxes in your organization. Then type following command,

foreach ($Mailbox in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $Mailbox -FilePath \\SERVER22\MyNetworkPST\Thomson\$($Mailbox.Alias).pst”}

This exports all mailboxesto corresponding PST files at the entered location.

Check Mailbox ExportStatus

To check the detailed status of ongoing export and requests, enter following command in the EMS,

Get-MailboxExportRequestStatistics

You can also remove the current mailbox export request by executing Remove-MailboxExportRequest cmdlet before starting a new mailbox export request with the default request name.

Conclusion

Though New-MailboxExportRequest cmdlet does the job, there are chances of PST file corruption during and after export. That’s due to the fact that large PST files are prone to damage due to integrity issues. However, corruption may also occur due to a network issue.

Plus, you can’t see the actual progress and estimate a timeline for export. It may take several hours or days to finish the mailbox export request, which leaves you vulnerable. Also,you can add filters but you can’t preview the mailbox items before exporting them to PST. You can only preview it in Outlook only after export. And if something is missing, you will have to execute the entire process again by changing the filters.

To ease up the Exchange 2016 to PST backup process, avoid PST corruption and data loss, you can export the Exchange mailboxes to corresponding PST files at a granular level by using an EDB converter software

The GUI based software can preview and export mailboxes from both offline and online Exchange 2016 databases without dismounting. Thus, you can expect no downtime. Also, there’s no file size limitation and you can use filter to export single, multiple or certain mail item or mailbox.

Further, you can also export mailboxes from offline EDB to a Live Exchange server or office 365 and other file formats such asEML, MSG, RTF, PDF, HTML.

To avoid all the hassle, you should definitely try Stellar Converter for EDB software.

3 Comments

  1. Brandon June 10, 2016
  2. Paco August 22, 2017
    • Admin August 25, 2017

Leave a Reply

Your email address will not be published. Required fields are marked *