Exchange Mailbox Export / Import Requests

  Exchange

Before you create any Export or Import; review/modify the max values for Transport, Receive and Send

PS C:\Set-TransportConfig -MaxSendSize 100MB -MaxReceiveSize 100MB
PS C:\Get-ReceiveConnector | Set-ReceiveConnector -MaxMessageSize 100MB
PS C:\Get-SendConnector | Set-SendConnector -MaxMessageSize 100MB

To create an export request:

PS C:\New-MailboxExportRequest -Mailbox UserName -FilePath "\\server\folder\username.pst"

** You need to grant read/write permission to the group “Exchange Trusted Subsystem” to the network share where you want to export or import mailboxes.

To get the Stats on the Export Requests:

PS C:\Get-MailboxExportRequest | Get-MailboxExportRequestStatistics

To create an Import request:

PS C:\New-MailboxImportRequest -Mailbox UserName -FilePath \\server\folder\username.pst

To create a report of the Import Request:

PS C:\Get-MailboxImportRequest | Get-MailboxImportRequestStatistics -IncludeReport | fl >C:\report.txt

To import multiple mailboxes:
This example imports all of the .pst files on a shared folder. Each .pst file name is named after a corresponding user’s alias. The command creates an import request for all the .pst files and imports the data into the matching mailbox.

PS C:\Dir \\SERVER01\PSTshareRO\Recovered\*.pst | %{ New-MailboxImportRequest -Name RecoveredPST -BatchName Recovered -Mailbox $_.BaseName -FilePath $_.FullName -TargetRootFolder SubFolderInPrimary}

To clean up the Mailbox Import Requests:

PS C:\Get-MailboxImportRequest -Status Completed | Remove-MailboxImportRequest

Leave a comment