Microsoft Exchange 2010: Exporting Mailboxes to PST

Sometimes you may want to export certain Exchange mailboxes to PST files - for backup or export needs. In this article, we will review how to bulk export user mailboxes in Exchange 2010.

Table of contents

    Backup Exchange Mailbox to PST

    Before exporting (e.g. backing up) the data from a user mailbox, you need to:

    1. Gain necessary Exchange permissions. Exchange server by default does not allow you to export mailboxes. It is even prohibited for Exchange Organization Administrators members.
    2. Prepare a storage folder for data export. It is better to use a network file path - we will discuss it below.
    3. Create a mailbox export request using PowerShell command.

    You can gain the necessary rights by running the following command in Exchange Management Shell with the account having security groups management rights:

    New-ManagementRoleAssignment -Role "Mailbox Import Export" -User DOMAIN\USER
    

    Change DOMAIN\USER to the account from which you will perform the export.

    Create a network share for the folder you will use as a PST storage. Since a mailbox export can perform on the Exchange server with a Client Access Server (CAS) role, it is necessary to ensure access to the selected folder. A network share is a good option if you use a few CAS servers or prefer to store mailbox data somewhere outside. Assign “Write” permissions to the network share for the user or group with “Mailbox Import Export" rights.

    Let’s export the data using Exchange Management Shell.

    How to Export Mailbox to PST with PowerShell Script

    Exchange 2010 SP3 (or earlier) has the command New-MailboxExportRequest, which you can use in Exchange Management Shell:

    New-MailboxExportRequest -Mailbox user_name -FilePath "\\server_name\ShareName\Filename.pst"
    

    Replace user_name with target user account name, and paste the network share URI next to the FilePath option. You can also use the following options for better exporting customization:

    • -Name used to name the particular request if you want to execute a few requests per single mailbox. It will just simplify the status check.
    • -ExcludeFolders and -IncludeFolders allows managing whether Exchange will export certain mailbox folders or not.

    Read the full list of parameters on the command info page.

    Note: if you get the “commandlet not found” error after entering the above command, you need to launch Exchange Management Shell using elevated privileges. Just right-click the Exchange Management Shell icon and choose Run as administrator.

    The Exchange will queue the export request and execute it as soon as possible. If the target mailbox is big or you need to export a few mailboxes - check the exporting status using this command:

    Get-MailboxExportRequestStatistics
    

    After the export has completed, you will see the desired PST file by the network path specified.

    If you need to export a few mailboxes at once, then you can create a simple script:

    • First, let’s create a PowerShell variable to store the list of usernames:
    $userMailboxes = "user1", "user2, "userN"
    

    Use any variable name instead of user Mailboxes, and list all exportable mailbox users separated by commas.
    If you would like to export all exchange mailboxes, you can use the following command instead of login names:

    • Use the variable from the previous step as a script parameter:
    foreach ($User in ($mailboxusers)) { New-MailboxExportRequest -Mailbox $User -FilePath "\\localhost\MailboxExports\$($User).pst" }
    

    Replace $mailboxusers with the variable you created ($User means every entry in the variable). Then replace the target file path before the “$($User).pst” part - it helps to name every single PST file with a user account name.

    You can run the script using Windows Task Scheduler to create mailbox-level backups regularly. But keep in mind that mailbox export is a time-consuming task which puts an additional load on the Exchange server with a CAS role.

    Why PST?

    In most cases, PST export is not a good way to backup Exchange data since it is slow, complex, and produces unwanted loads to Exchange servers. But it is a good option to take copies of a few mailboxes and move them outside; or to use as a data migration process. You can even implement an additional layer of data protection using PST exports since it allows you to recover calendar events, individual emails, contacts, and so on without a database restoration process.

    In this scenario, you can use third-party tools supporting item-level access to the Exchange backup or script out necessary actions using built-in Exchange PowerShell capabilities.

    Keep PST Files Safe

    If you plan to create an item-level backup using a set of exported PST files, then you should also take care of the storage reliability since large backup files could be corrupted or overwritten by subsequent backup tasks. We can suggest implementing a 3-2-1 backup strategy, which allows you to increase a company’s crucial data resilience in any case of disaster. The key is keeping several backup copies of data, spread across separate storage sites.

    When choosing your own implementation of a 3-2-1 strategy, keep in mind that most popular cloud storage providers (AWS, Microsoft Azure, Google Cloud Storage platform, etc) mostly have geo-distributed architecture that allows them to survive even after massive natural disasters.

    Summary

    You can use the Exchange mailbox export feature to move or toss the data to or from an Exchange organization. There is also a script allowing you to automate the task for a set of mailboxes.

    But if you are choosing this export feature as a backup tool for Exchange items backup, you should also ensure PST files protection. You can even integrate PST exported files into your existing backup infrastructure. If you do not have one - try our CloudBerry Backup for MS Exchange for free and test cloud backup and Exchange items recovery features.