Category
Exchange 2007 Export-Mailbox
When Microsoft introduced Exchange 2007, they took away ExMerge, an amazing program which made it incredibly easy to export a user’s data to a PST file. The initial release had no easy tools to export to PST. It wasn’t until Service Pack 1 that a PowerShell tool, Export-Mailbox, was introduced.
Export-Mailbox works great, as long as your comfortable with command line. Don’t expect to have it work out of the box, though. You need to run it on a 32-bit machine (download Exchange SP1–it’s only 800MB+. Install only the Management Tools during setup), and you need Outlook installed on the machine. You also need to run the Export-Mailbox (and install the Management Tools!) from a user that has domain admin/exchange admin/enterprise admin rights.
Once you’ve got an environment set up, your ready. Right? Not quite. If you open the Exchange Management Console and run the Export-Mailbox command, you’ll likely get an error:
[PS] Export-Mailbox -Identity cool.dude -PSTFolderPath “C:\Export\cooldude.pst”
Export-Mailbox : Error was found for Cool Dude (cool.dude@jakersblog.com) because: Error occurred in the step: Moving messages. Failed to copy messages to the destination mailbox store with error:
MAPI or an unspecified service provider.
ID no: 00000000-0000-00000000, error code: -1056749164
At line:1 char:15
+ Export-Mailbox <<<< -Identity cool.dude -PSTFolderPath “C:\Export\cooldude.pst”
After that, you’ll get a long list of details about the transfer. What went wrong, you may ask? Well, this is a permissions issue with the mailbox. Take note of the account your attempting to do the export from, then add that user to the mailbox with Full Access.
Adding Full Access Permission via the Console
Click on Recipient Configuration. Right-click on the user you wish to export, and select Manage Full Access Permission… Add the user of the account you are exporting from on your workstation (Newbie Translation: I’m logged in as the domain administrator “AdminGuy”, so I need to add “AdminGuy” to the list).
Adding Full Access Permission via the Shell
Add-Mailboxpermission -Identity <mailbox you are importing to> -accessrights fullaccess -user <account you are exporting from on your workstation>
Once you have Full Access permissions to the mailbox, you should now be able to re-run the Export-Mailbox utility and watch it succeed (watch for StatusMessage: This mailbox has been exported to the PST file.)
~Jaker