How to Export and Import Mailboxes with Exchange 2007

There are various reasons why organizations would want to import and export mailboxes from Exchange 2007. The primary reason most often being to have a backup of the users’ mailboxes.  There are a number of ways to effectively back up mailboxes off Exchange 2007; however, most of these require third-party tools. Luckily, Exchange 2007 offers a useful cmdlet to allow an administrator to export mailboxes from Exchange 2007 into PST files. It should be noted that cmdlets are commands intended to be used under Windows PowerShell. Other reasons to export mailboxes are forensics and compliance.

Having a secure periodic backup for all emails from your Exchange server might be useful to conduct investigations should someone delete emails off the Exchange server or if some emails are manipulated to hide possible wrong doing. This information is also essential for the organization to meet compliance and eDiscovery. In order to ensure chain of custody and forensic integrity, the administrator should also hash the export PST and keep the hash in some secure escrow – ideally under the care of an impartial third-party. In addition, a chain of custody document should be created specifying where the data is being stored and who is responsible for it. If one needs to change the data it is best to make these changes on a copy to ensure the uncompromised integrity of the original. Should data move or change ownership this document will need to be updated.  Same process also applies in terms of compliance.

Backing up mailboxes in Exchange 2007 is pretty straight forward although there are a couple of pitfalls to look out for.


Before we begin we must ensure our environment is properly set up to support the export operation.

There are a few things you will need in order to export a mailbox from Exchange 2007 into a PST file:

  • Outlook 2003 (SP2) or Outlook 2007 (do not install this on the same machine that has Exchange 2007)
  • 32 bit version of the Exchange Management tools (note: 64 bit version will not work due to 32 bit / 64 bit compatibility issues)
  • The user you’ll be using for the operation needs to have full access rights on the mailbox being exported. For this you can either use an administrator account or you can add FullAccess rights to any user. This can be done using the Add-MailboxPermission cmdlet. The command to execute for this operation should be as follows:

Add-MailboxPermission -Identity [Mailbox] -User [user to assign rights to] -AccessRights FullAccess.

To export the mailbox you need to use the Export-Mailbox cmdlet.

You need to use this on a machine that has the Outlook installation and the 32 bit version of the Exchange management tools, and not on the machine which has Exchange 2007 installed, or else the operation will not work.

You will need to export the contents of the mailbox to a PST file; this should be done by running the command:

Export-Mailbox –Identity [Email Address] -PSTFolderPath [Path and Filename of the resulting PST]

The above command will export the mailbox of the specified email address into the file you would have requested. At this stage if you intended to use this export for forensics or to comply with certain compliance requirements, before doing anything else the exported PST should be hashed and a chain of custody should be recorded on the chain of custody document. Make sure the hash is stored in a safe place where there will be no doubt about the hashes integrity.


When you want to import a PST file into Exchange 2007 the process is quite similar.

Things to keep in mind:

  • You must run the process from a machine that has:
    • Outlook 2003 (SP2) or Outlook 2007 (do not install this on the same machine that has Exchange 2007)
    • 32 bit version of the Exchange Management tools (note: 64 bit version will not work)
    • You can only import PST files into Exchange server 2007 using this method, one needs to use the Microsoft Exchange Server Mailbox Merge wizard for Exchange server 2003 or prior
    • The mailbox you’re importing into needs to exist.

To import the PST file into your mailbox all you need to do is run the command:

Import-Mailbox –Identity [Email Address] -PSTFolderPath [Path and Filename of the resulting PST]

IF you want your data to be forensically valid, this operation should also be recorded in the chain of custody document to ensure there will be no gaps that might result in unexplained data changes.

Following these simple steps you can successfully import and export to and from PST files on an Exchange 2007 installation.