How to Export Exchange 2016 Mailbox to PST – PowerShell Commands
Summary: In this post, we’ve discussed the detailed procedure of exporting Exchange 2016 mailbox to PST by using the native tools of Exchange. In addition, we’ve mentioned about an EDB to PST converter that can easily export mailboxes to PST and other formats from any Exchanger server database – be it online or offline.
Contents
You may need to export data from Exchange Server 2016 to PST due to various reasons. Some of the reasons are archiving, leavers, and migration from Exchange Server to Office 365 or other platforms. In this article, we are going through all the possible options to export data from Exchange Server 2016 to PST.
There are two ways to export Exchange 2016 mailbox to PST:
- Export using the Exchange Admin Center (EAC)
- Export using the New-MailboxExportRequest – PowerShell cmdlet
Requirements
There are some requirements and permissions which need to be done beforehand. These are:
- Preparation of the shared folder with the right permissions
- Having the right permissions on Exchange Server
Setting the right permissions on Exchange
This can be done by using the Exchange Admin Center (EAC) or via PowerShell.
Here are the steps to set permissions using EAC:
- Open the Exchange Admin Center (EAC).
- After logon, click on Permissions and Admin roles.
- Click on the + button and create a new role.
- Assign the Import/Export role to the new role and add the users you wish to have this permission.
To set permissions using the Exchange Management Shell (EMS), you need to create and assign the role by using the New-ManagementRoleAssignement cmdlet as given below.
New-ManagementRoleAssignment –Role "Mailbox Import Export" –User "<Username>"
New-ManagementRoleAssignment -Role "Mailbox Import Export" -SecurityGroup "Organization Management" -Name "Import Export"
You cannot export directly to a folder, for example, C:\PSTExports. For the file exports to work, you need to use the UNC path of a share. You need to create the folder C:\PSTExports and share the folder with Exchange Trusted Subsystem and set the permissions to Read/Write.
Export using the Exchange Admin Center (EAC)
To export the mailbox from the Exchange Server to PST using the EAC, follow the given steps:
- After logging in to the EAC interface, click on Recipients and Mailboxes.
- Highlight the mailbox to export and click on more options.
- Click on Export to a PST file.
To export the mailbox from Exchange Server to PST using the EAC, follow the given steps:
- In the next screen, select the mailbox and the archive data (if you want to export it).
- Select the path to export to.
- Enter the user who will be notified when the export is complete..
Export using the PowerShell
To export to PST via PowerShell, open the Exchange Management Shell (EMS) and use the New-MailboxExportRequest cmdlet.
Use the command below to export the PST to the share:
New-MailboxExportRequest -mailbox user1 -filepath "\Server\PST_Export\UserExport1.pst"
This will start the export of the mailbox. To check the status of the export, you can use the Get-MailboxExportRequest PowerShell cmdlet. It will show the status of the export as In-Progress, Failed, or Completed.
With this export command, you can also filter by folder or date.
Include or Exclude a folder
To include a folder, use the -IncludeFolders parameter (as given below). You can also include multiple folders, separated by commas.
New-MailboxExportRequest -Mailbox 'user-a ' -Filepath "\Exchange\PST_Export\User-a.pst " -IncludeFolders "#Inbox# ", "#Outbox# "
To exclude a folder, you can use the -ExcludeFolders parameter (see the example below).
New-MailboxExportRequest -Mailbox 'user-a ' -Filepath "\Exchange\PST_Export\User-a.pst " -ExcludeFolders "#Spam# ", "#Outbox# "
Filter by Date
Apart from the folder (include or exclude), you can specify a date. This can be done by using the -ContentFilter with lt (less than) and gt (greater than) switches, as given below:
To export all emails older than January 1, 2021,
New-MailboxExportRequest -ContentFilter {(Received -lt '01/01/2020')} -Mailbox user-a ' -Filepath "\\Exchange\PST_Export\user-a.pst"
To export all emails newer than January 1, 2021,
New-MailboxExportRequest -ContentFilter {(Received -gt '01/01/2020')} -Mailbox user-a ' -Filepath "\\Exchange\PST_Export\user-a.pst"
Apart from newer or older, you can export a date range by using the combination of both lt and gt switches and also include the folder parameters too.
New-MailboxExportRequest -ContentFilter {(Received -gt '01/01/2020') -and (Received -gt '01/07/2020')} -IncludeFolders "#Inbox#" -Mailbox "td1" -FilePath "\localhost\c$\PSTFiles\td1_3.pst"
Pros and Cons of Above Methods
Both methods work fine and will help you export from Exchange Server 2016 with no issues. Once the export is complete, you can open the PST file in any Outlook account.
However, these native tools will only work if the database is mounted and healthy. If you need to export from a failed Exchange server or failed database, you can’t export by using these native Exchange tools.
The Alternative
Stellar Converter for EDB is the application that an Exchange Admin should have in his arsenal as it can open any Exchange Server database – from 2007 to 2019. It can export to PST and other formats, with a variety of export criteria. You can also use the EDB to PST converter tool for migration to a newer Exchange Server or Office 365, since you can export directly to the destination.