Late last week it came to my attention that in Exchange 2010 SP1, Microsoft made some major changes to the way we export mailboxes to PST files. While I usually say that I embrace change, I don't when it comes to applications I manage.
For those familiar with Exchange 2007, the Export-Mailbox cmdlet was a nice and easy method to take some email and dump it into a PST. All you had to do was provide yourself full access to the mailboxes you were looking to export and run the cmdlet. Well goodbye Export-Mailbox, hello
New-MailboxExportRequest.
How does this new New-MailboxExportRequest cmdlet work? Well, don't even try to run it until you have made some security modifications. Before even being able to run this cmdlet, you need to add the new Import Export security role to a Role Group. If you don't do this, you will not even be able to run the cmdlet.
Add the Import Export Security Role to a Role Group:
- Create a new universal security group to provide the Import Export role to. ie: Enterprise Support
- Populate the group with the account(s) you want to perform the mailbox exports to.
- Run the below command from the Exchange Management Shell:
New-ManagementRoleAssignment -Name "Import Export_Enterprise Support" -SecurityGroup "Enterprise Support" -Role "Mailbox Import Export"
- Close and re-open the Exchange Management Shell.
- For a complete explanation of this process, you can peruse the following Microsoft article:
http://technet.microsoft.com/en-us/library/ee633452.asp
An Additional Note on Security:
Microsoft has changed how this process works as it now uses the Mailbox Replication Service. Because of this, you must ensure that the Exchange Trusted Subsystem group has read/write access to the network share you are going to save your PSTs to. If you were paying attention to my last sentence I did use network share. The syntax of the New-MailboxExportRequest cmdlet looks for a UNC path so make sure you provide access for that group.
Exporting Mailboxes:
Now that Exchange security is all set, it's time to export some email. The general process is pretty straight forward, pick your mailbox then set your file path (UNC of course) and you're done.
New-MailboxExportRequest -Mailbox AylaKol -FilePath \\MBX-01\PSTFileShare\Ayla_Recovered.pst
For complete details on how to run this command you can check out http://technet.microsoft.com/en-us/library/ff459227.aspx
Normally, we never just have to export 1 mailbox, it is usually all mailboxes or a large group which can be in achieved in a number of ways. For those of you not 100% comfortable with Powershell, I've found that Excel and the =Concatenate command help make excellent .bat files. For all of the powershell guru's out there, I'm sure creating loops with variables that read names from .txt files will be no problem.
Importing Mailboxes:
Importing Mailboxes uses the same security roles so there are no additional pre-reqs. This is utilizes the New-MailboxImportRequest cmdlet. You can find complete details on the command here:
http://technet.microsoft.com/en-us/library/ff607310.aspx
I hope everyone finds this posting to be helpful.