How to Export Exchange 2013 Mailboxes to PST

Database administrators might often need to export Exchange database (EDB) files into PST format. The most common reason for doing so is to extract data from damaged EDB files and access it with Outlook PST. But performing this export has traditionally been a tedious task involving quite a lot of time and utmost care.

In Exchange versions before 2010, to import/export EDB to PST, administrators had to rely on third-party utilities like ExMerge. However, Exchange Server 2010 SP1 onwards, some special PowerShell cmdlets (New-MailboxImportRequest and New-MailboxExportRequest) began coming into use to perform this import/export. Further enhancements were made over to these cmdlets over the years and in Exchange 2013, they have been extended and their performance improved.

Try Stellar Converter for EDB for Exporting MS Exchange (2016, 2013, 2010, and 2007) Mailboxes to PST without any error or data loss

This article will be covering the steps to import/export Exchange 2013 mailboxes to PST using these cmdlets in their new version.

Step 1: Assigning rights

First of all an account needs to be given the rights to perform the import/export. Contrary to perception, even the admin account doesn’t have the rights to perform this operation by default. To do this, type the following command in PowerShell:

New-ManagementRoleAssignment –Role “Mailbox Import Export” –User usetest

Here ‘usetest’ is the name of the account to which the rights are given.

Instead of handing over the rights to a single account, in many cases just to make things convenient, the rights are assigned to the AD group. In this way whenever the rights are to be given to a new account, that account only needs to be added to this group. If you wish to do the same, the syntax mentioned above will slightly change as shown below:

New-ManagementRoleAssignment -Role “Mailbox Import Export” -SecurityGroup ExchangeAdmGroup

Here ‘ExchangeAdmGroup’ is the name of the AD group.

This process can also be done from the Exchange Admin Center (EAC) GUI. After giving the rights, you’ll need to restart the EAC.

Exchange 2013 Mailboxes to PST

Step 2: Export Exchange 2013 mailboxes to PST

To perform the export successfully, the following conditions must be met first:

  • The Exchange 2013 mailbox to be exported must exist
  • The target PST file must be present on the network and its complete UNC path known (for example \\PCName111\C$\PST\tstmail.pst).
  • The account with which the export will be performed should have access to the network location of the PST file.

The cmdlet New-MailboxExportRequest is used to perform the export as follows:

New-MailboxExportRequest –Mailbox mailtst –FilePath \\HQ-FS01\ExportPST\mailtst.pst

The above command will export the entire mailbox to the mentioned PST. To export a particular folder to the PST, change this command as follows:

New-MailboxExportRequest –Mailbox mailtst –FilePath \\HQ-FS01\ExportPST\mailtst.pst -IncludeFolders “#Inbox#”

Similarly, in order to exclude a folder from the export, the command can be changed as follows:

New-MailboxExportRequest –Mailbox mailtst –FilePath \\HQ-FS01\ExportPST\mailtst.pst – ExcludeFolders “#DeletedItems#”

As indicated, this case typically implies on the ‘Deleted Items’ folder.

You can further customize the command as per need. For example, to export all emails received after 1st January with the keywords “London” and “MSProject”, excute the command as follows:

New-MailboxExportRequest –Mailbox mailtst –FilePath \\HQFS01\ExportPST\mailtst.pst –ContentFilter {(body –like “*MSProject*”) –and {body –like “*London*”) –and (Received –lt “01/01/2015”)}

If the export task is queued on the Exchange Server, you can see its status by executing the following command:

Get-MailboxExportRequest

Step 3: Import PST to Exchange 2013

While we’re at it, let’s also check out the commands to perform the import. The basic conditions to be met before starting this process are the same as those for the export.

Once fulfilled, execute the following command to perform the import:

New-MailboxImportRequest -Mailbox usetest -FilePath \\HQ-FS01\PST\usetest.pst

This command unites the contents of the existing folders in the target mailbox and adds new folders to the current mailbox folder structure. To import the PST contents into a particular existing folder of the Exchange 2013 mailbox, execute the following command:

New-MailboxImportRequest -Mailbox usetest -FilePath \\HQ-FS01\PST\usetest.pst -TargetRootFolder “Old_mail” -IncludeFolders “#Inbox#”

Any standard folder of the Exchange mailbox can be used as the destination in the above command.

Once this command has been executed, the import task in queues on the Exchange Server. To see its status run:

Get-MailboxImportRequest

To see the status of the import tasks in percentage, change the above command as follows:

Get-MailboxImportRequest | Get-MailboxImportRequestStatistics

To see the task status for a particular mailbox (for example, mailtst):

Get-MailboxImportRequest mailtst

To remove the complete import requests from the Exchange Server queue:

Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest

To import multiple PST files into Exchange 2013 mailboxes, execute the following command:

For each ($i in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $i -FilePath “\\HQ-FS01\PST\$($i.Alias).pst” }

In this command the names of the PST files are assumed to correspond with the names of the mailboxes.

Important Note: The import process can sometimes fail due to damage of the PST file structure or the request exceeding mailbox size limit. If a failure occurs, a detailed report on it can be seen through the following command:

Get-MailboxImportRequest -Status Failed | Get-MailboxImportRequestStatistics -IncludeReport | Format-List > AllImportReports.txt

You can also choose to skip some bad items of the PST files. To specify the limit of bad items that can be skipped:

New-MailboxImportRequest -Mailbox mailtst -FilePath \\HQ-FS01\PST\usetest.pst -BadItemLimit 10

Final Words

So that is the detailed process of performing import/export of Exchange 2013 mailboxes to PST format. However as you would have noticed, this process requires the execution of PowerShell cmdlets that need some form of technical expertise to handle. If you’ve never done this before and make even a simple mistake as a spell-error, the results could be disastrous including data loss. Thus, to avoid such issues, using trustworthy automated EDB to PST conversion tool Stellar Converter for EDB is recommended. This tool converts all or selected items within the EDB to PST format accurately and in minimum time.

Free Download

You may also be interested to read:

Managing PST Import-Export process in Exchange Server 2013 (Part 1)

Managing PST Import-Export process in Exchange Server 2013 (Part 2)

 

Comments(21)
  1. Isabella June 22, 2018
    • Eric Simson June 25, 2018
  2. Peter April 27, 2018
  3. Henna March 27, 2018
    • Eric Simson March 28, 2018

Leave a Reply

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

Time limit is exhausted. Please reload CAPTCHA.