PowerShell Export Multiple Mailboxes to PST

Written by James McDonald

August 26, 2015

This script exports the email aliases in $export_names to a file with a yyyymmdd date stamp.

The BadItemLimit is jacked really high because when a mailbox is 24+ GB and has a lot of weird Chinese and other character sets that make the export think it’s corrupt.

I’m finding I like powershell.

$export_date = $(get-date -f 'yyyymmdd')

$export_location = "\\servername\mailbox_exports\"

$export_names = @("jamesm", "ruperts", "mandyb")

ForEach($name in $export_names) {
	New-MailboxExportRequest -Mailbox $name  -FilePath ($export_location + $name + $export_date + ".pst") -BadItemLimit 1000 -AcceptLargeDataLoss
}

0 Comments

Trackbacks/Pingbacks

  1. Transferring from a PST to IMAP Server | The Southern IT Observer - […] A few weeks ago I blogged about Running a Mailbox export from Exchange to PST using powershell at https://toggen.com.au/it-tips/powershell-export-multiple-mailboxes-to-pst […]

Submit a Comment

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

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Squarespace Image Export

To gain continued access to your Squarespace website images after cancelling your subscription you have several...

MySQL 8.x GRANT ALL STATEMENT

-- CREATE CREATE USER 'tgnrestoreuser'@'localhost' IDENTIFIED BY 'AppleSauceLoveBird2024'; GRANT ALL PRIVILEGES ON...

Exetel Opt-Out of CGNAT

If your port forwards and inbound and/or outbound site-to-site VPN's have failed when switching to Exetel due to their...