PowerShell-Import & Export Exchange 2013 PST

Please refer to the following PowerShell Script we use to Import & Export Exchange 2013 Mailbox to local PST as 1 of our Exchange 2013 Migration Approach

Export Mailbox to PST

New-MailboxExportRequest -Mailbox $Mailbox -FilePath "\\EX01\M$\PST\$Name.pst"

Import PST to Mailbox

New-MailboxImportRequest -Mailbox $Mailbox -FilePath \\EX01\M$\PST\$mailbox.pst

Monitor the Export / Import Progress

Get-MailboxExportRequest | Get-MailboxexportRequestStatistics
Get-MailboxImportRequest | Get-MailboxexportRequestStatistics

Clear the Mailbox Export / Import Request

Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest -Confirm:$false
Get-MailboxImportRequest -Status Completed | Remove-MailboxImportRequest -Confirm:$false

Bulk Export Mailbox to individual PST file
1. Get all the existing Mailbox, and store the exported PST in Alias.PST in UNC Path (** Must use UNC path)

$mailboxes=(Get-Mailbox)

foreach ($mailbox in $mailboxes) {

    $Name = $Mailbox.alias

    New-MailboxExportRequest -Mailbox $Name -FilePath "\\EX01\M$\PST\$Name.pst" 

}

Bulk Import PST to individual Mailbox

$PSTs=Get-ChildItem -Path \\IB-MBX02\m$\PST

foreach ($PST in $PSTs) {

$Name = $PST.BaseName #Remove the .pst extendsion 

New-MailboxImportRequest -Mailbox $Name -FilePath "\\EX01\M$\PST\$Name.pst" 

}

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top