Starting in Exchange 2010 you had the ability to easily export use mailboxes to file, which works great with archiving former users, moving to other email services, etc. Then, Service Pack 1 made it even better by removing the need to have Outlook installed on the server to export to file.
Before an administrative-type user can use the New-MailboxExportRequest command, they first need to have the Management Role Assignment of “Manage Import Export” assigned:
New-ManagementRoleAssignment -Role “Mailbox Import Export” -user <username>
Once this command has been executed, you will need to restart the Exchange Powershell, as you will then have the necessary access rights to perform the command.
New-MailboxExportRequest -Mailbox “End User” -Filepath “\\store1\Archived Users\enduser.pst”
The common problem when exporting to a network share is running into an “Access to the path is denied” message I went to start the command. To correct this, you need the Exchange Trusted Subsystem account setup with full control on the share, and in Windows 2008 and higher if you use the Share wizard it takes care of file ACLs as well.
Once the permissions are set, and you’re relaunched the Lync Management Shell (again), you should be able to execute the command again successfully. Finally, you’ll want to monitor the status of the command to make sure the status is Complete.
Get-MailboxExportRequest
Once all of the requests have complete, you can clear the list by piping a few commands:
Get-MailboxExportRequest | where {$_.status -eq “Completed”} | Remove-MailboxExportRequest
You’ll need to press A (for “Yes to All”) to clear all requests, then you’re good to go!