Exporting mailboxes from Exchange 2007

On January 18, 2011, in Tech Tips, by Michael

This is really just a repost from the MS Exchange Team Blog, how ever, i found it really handy when I had to decommission an unused Exchange 2007 server recently:

Export/Import to PST Requirements

In order to export or import mailboxes to PST files the following requirements must be met:

  • Export/Import to PST must be run from a 32 bit client machine with Exchange Management Tools installed (Version Exchange 2007 SP1 or later). The 32bit requirement comes from a dependency with the Outlook client.
  • Either Outlook 2003 or Outlook 2007 must be installed on the client machine.
  • The user running the task must be an Exchange Organization Admin or an Exchange Server Admin on the server where the mailbox to export/import lives.

Exporting mailboxes to PST files

The most basic cmdlet to export a mailbox to a PST file is as follows:

Export-Mailbox –Identity <mailboxUser> -PSTFolderPath <pathToSavePST>

PSTFolderPath must be a full path pointing either to a directory or to a (.pst) file. If a directory is specified a PST file named after the mailbox alias will be used as the target of the export. Note that if the PST file already exists the contents of the mailbox will be merged into it.

Please note, that they really do mean, you have to run it from a 32bit machine with 32bit Outlook and Exchange Management Tools installed on it! Unfortunately for me, this meant installing Outlook and the Exchange Management Tools onto our Primary DC (to avoid spending hours downloading and setting up another 32bit server).

Another issue that I came across was lack of access to the mailboxes from the account that i was attempting to do the exports from. To circumvent this, I had to run this command from command prompt on each of the mailboxes that I needed to export:

Add-mailboxpermission -identity <mailbox> -accessrights fullaccess -user <domain\user>

Once this command was run, I was then able to export all of the mailboxes to a directory which i then RAR’d up for archiving.

Tagged with: