A mailbox export request is a process of exporting mailbox or archive data to a
.pst file. It’s very simple to do with Exchange Management Shell.
The first thing you need to know is that Exchange Management Shell is not the same as Exchange Management Console. As the name suggests, the Shell is a Powershell based command-line interface to manage Exchange.
Before you begin
- The first thing to keep in mind that you can only export to a UNC path.
- Exchange Trusted Subsystem security group needs to have modify NTFS permissions on the destination folder.
To export, simply fire up the Exchange Management Shell and use the
New-MailboxExportRequest cmdlet. Lets assume that the user whose mailbox we are exporting is called “John Doe” and his username is “johndoe”
New-MailboxExportRequest -Mailbox johndoe -FilePath "\\server\folder\file.pst"
You can start many export requests at the same time. They will be added to the queue.
Note: You may get an error as follows:
The term "New-MailboxExportRequest" is not recognized.
This may happen because of missing roles. In order to resolve this issue, grant the account performing the export request the ‘Import Export Mailbox’ role assignment.
New-ManagementRoleAssignment –Role “Mailbox Import Export” –User "DOMAIN\USER"
Restart your powershell session and try again.
See the export status
To see the status while it is exporting, use this cmdlet:
You can use various formatting options:
Get-MailboxExportRequest | Format-List
Get-MailboxExportRequest | Format-Wide -Property Mailbox
Get-MailboxExportRequest | Format-Table
Get-MailboxExportRequest | Format-Table -Wrap
Get-MailboxExportRequest | Format-Table -Property Mailbox, Status
Clear completed export requests
Completed mailbox export requests aren’t cleared automatically. You can remove fully or partially completed mailbox export requests by using the following cmdlets.
This will remove the export request only for the user “John Doe”.
Remove-MailboxExportRequest -Identity "John Doe\MailboxExport"
This will remove all completed export requests.
Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest
To read more about exporting mailboxes, you can check out this TechNet article by Microsoft.
(header image source: wallpaperscastle.com)