Import Export PST Exchange 2010

In 2003 we could use a standalone utility called Exmerge. In 2007/2010 we’re forced to utilize the built-in standards of the PowerShell. I’m not complaining too much as I really enjoy the command line more than the GUI, but I’d prefer if Microsoft would keep to the same standard through all the version increases (exmerge worked in 5.5, 2000, and 2003 exchange).

So first thing is first – assign the Mailbox Import Export role to your user. Note: even if you’re using the domain administrator account with which you installed Exchange 2010, you will have to do this – by default NO users have this ability.
New-ManagementRoleAssignment -Role "Mailbox Import Export" -User YOURUSERNAMEHERE
Or if you want to give an AD group this role, and avoid any future powershell typing:
New-ManagementRoleAssignment -Role "Mailbox Import Export" -Group ADGROUPHERE

Now you must install Outlook 2010 x64 on the Exchange Server. I honestly have no idea why this is required, but apparently you get the following message if it’s not installed:

To export to or import from a .pst file, the 64-bit version of Outlook 2010 or later must be installed on the server to which you are connecting (server fqdn).

So then run the following command to export:
Export-Mailbox -Identity USERNAME -PSTFolderPath c:\path\to\saving\file.pst

Then you can import using a similar command:
Import-Mailbox -Identity USER@EMAILADDRESS.TLD - PSTFolderPath c:\path\to\saved\file.pst

If you want to import all of the pst files in a certain directory, make sure the pst is named with ‘alias.pst’ where alias is the name of the mailbox to which the data shall be imported.
Dir c:\path\to\pstfiles | Import-Mailbox -StartDate 01/01/2010
If you leave off the startdate, it will merge all mail in the PST

http://technet.microsoft.com/en-us/library/bb629586.aspx

***EDIT***
So apparently the above did not work on the Exchange 2010 SP1 system I was running against – command not found. Perhaps it was because I refused to install Outlook 2010 x64 on the system. Perhaps that was meant for pre-SP1? Or maybe 2007? I stopped really caring.

You still have to assign the Mailbox Import Export role to the user running the command.
New-ManagementRoleAssignment -Role "Mailbox Import Export" -User USERNAMEHERE

Export the mailbox to a PST
New-MailboxExportRequest -Mailbox MAILUSERNAME -FilePath "\\path\to\dir_or_c:\path\to\dir\FILENAME.pst"

Check the progress of your export
Get-MailboxExportRequest | Get-MailboxExportRequestStatistics

Remove the request after completion
Get-MailboxExportRequest | Remove-MailboxExportRequest

Thanks to Stevieg http://www.stevieg.org/2010/07/using-the-exchange-2010-sp1-mailbox-export-features-for-mass-exports-to-pst/

Leave a Reply

Your email address will not be published. Required fields are marked *