Scripting: Exchange 2010 — Exporting Mailboxes to Personal Folders FilesMicrosoft Exchange 2010 Service Pack 1 has the ability to export a mailbox to a Personal Folders file (.PST) natively (unlike Exchange 2007 which requires a 32-bit version of Microsoft Outlook on the same system) using the New-MailboxExportRequest cmdlet. Setting Up
Running The Task
Check ResultsOpen the Exchange Management Shell in elevated mode and enter: Get-MailboxExportRequest | where {$_.status -eq "Failed"} If any operations failed, create a detailed log: Get-MailboxExportRequest | where {$_.status -eq "Failed"} | Get-MailboxExportRequestStatistics -IncludeReport | Format-List > c:\Failed-Exports.txt Errors are most likely due to corrupted items in the mailbox. One “remedy” is to let the export run with a tolerance for errors; add the following to the New-MailboxImportRequest command: -BadItemLimit 5000 -AcceptLargeDataLoss How It WorksWhen an export request is completed, it remains in the system for 30 days (by default). So the first lines of the script remove any existing requests which have completed or failed. The remaining lines create an export request for each mailbox, and specifies the destination as a Personal Folders file called <Mailbox Alias>.pst. The command in the batch file executes the script with PowerShell with the Exchange cmdlets loaded. Because this process queues a “request” for a mailbox export, at the time the script finishes, the exports have not yet finished (or started, usually). |