Exchange 2010 – How to Export Mailbox to a PST File

The following process details how to export mailboxes using Exchange 2010 SP1.

Step 1: Assign the ‘Mailbox Import Export’ Role to the account

Before being able to export (or import) mailboxes you will need to assign the ‘Mailbox Import Export’ role to the account you use for Exchange administration.

This can be applied to an individual account or a security group.

To assign the role you will need to run one of the following PowerShell commandlets with an account which is a member of the ‘Organization Management’ security group. For Example, a domain administrator account already has this level of access.

Assign ‘Mailbox Import Export’ to a user

In this example we will be applying the role to the ‘Administrator’ user account.

New-ManagementRoleAssignment -Role "Mailbox Import Export" -User MOXKBOX.NETAdministrator

MSExchange2010-ImportExport1

Assign ‘Mailbox Import Export’ role to a security group

In this example we will be applying the role to the ‘HelpDesk’ security group.

Please note, the security group needs to have a ‘Universal’ scope.

New-ManagementRoleAssignment -Role "Mailbox Import Export" -SecurityGroup HelpDesk

MSExchange2010-ImportExport3

Step 2: Export the mailbox using the Exchange Management Shell

There are several ways you can choose which mailboxes get exported. In the following examples we will be exporting an individual mailbox, all mailboxes in a database and all mailboxes in the Exchange environment.

Each of these example uses the Exchange Management Shell.

You will need a shared folder to save the exported mailboxes to.

Export an individual mailbox

This example will:

  • Export the mailbox ‘TomSmith’
  • Save the exported mailbox to W2K8DC1PSTExportTomSmith.pst
New-MailboxExportRequest -Mailbox "TomSmith" -FilePath W2K8DC1PSTExportTomSmith.pst

MSExchange2010-ImportExport2

Export all mailboxes in a database

This example will:

  • Export all mailboxes in the ‘MAILDB1’ database
  • Save the exported mailboxes to W2K8DC1PSTExport
  • Each exported file will use the mailbox name, i.e. the TomSmith mailbox will be saved as TomSmith.pst
foreach ($i in (Get-Mailbox -database MAILDB1)) { New-MailboxExportRequest -Mailbox $i -FilePath "W2K8DC1PSTExport$($i.Alias).pst" }

MSExchange2010-ImportExport4

Export all mailboxes in a database

This example will:

  • Export all mailboxes in the Exchanage Environment
  • Save the exported mailboxes to W2K8DC1PSTExport
  • Each exported file will use the mailbox name, i.e. the TomSmith mailbox will be saved as TomSmith.pst
foreach ($i in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $i -FilePath "W2K8DC1PSTExport$($i.Alias).pst" }

MSExchange2010-ImportExport5