MS Exchange how to export / import mailboxes to PST Print

  • 8

This is done through the Exchange Management Shell.

EXPORT OF PSTs
Give the desired user permission to export to PST:

New-ManagementRoleAssignment –Role "Mailbox Import Export" –User acs-hosting \ Admin

Close the EMS before continuing and reopen it to ensure that the command is perceived

To start export:

New-MailboxExportRequest -Mailbox mailbox-name -FilePath \\ ex2010 \ export \ name.pst

At this point the export request will be sent, the export is asynchronous so it will take place in the following minutes / hours and it is possible to have an export status with the following command:

Get-MailboxExportRequest

for example to see completed requests:

Get-MailboxExportRequest | where {$ _. status -eq "Completed"}

Upon completion of the export operation, the request must be removed

Remove-MailboxExportRequest

To remove all completed (or queued) requests the command is:

Get-MailboxExportRequest | where {$ _. status -eq “Completed”} | Remove-MailboxExportRequest

IMPORT OF PSTs
To import pst into Exchange use the following command:

New-MailboxImportRequest -FilePath \\ HOSTNAME \ sharename \ alan.reid.pst -Mailbox john.smith

Here too, to view the status of the import tasks, the command is:

Get-MailboxImportRequest

Other useful commands:

Generate Reports for Successfully Completed Imports:

Get-MailboxImportRequest -Status Completed | Get-MailboxImportRequestStatistics -IncludeReport | Format-List> c: \ AllImportReports.txt

View completed requests:

Get-MailboxImportRequest | where {$ _. status -eq "Completed"}

Remove completed requests:

Get-MailboxImportRequest | where {$ _. status -eq “Completed”} | Remove-MailboxImportRequest

Remove requests with failed status:

Get-MailboxImportRequest | where {$ _. status -eq “failed”} | Remove-MailboxImportRequest

Bulk import command:

Dir DC2APST_To_Import * .pst | % {New-MailboxImportRequest -Name RecoveredPST -BatchName Recovered -Mailbox $ _. BaseName -FilePath $ _. FullName -TargetRootFolder Imported_Mail}

Import request with errors, up to 200 errors accepted:

New-MailboxImportRequest -FilePath \\ servername \ sharename \ filename.pst -Mailbox mailboxname -BadItemLimit 200 -AcceptLargeDataLoss


Was this answer helpful?

« Back