Batch export Exchange mailboxes to PST

I recently had a requirement to export a bunch of mailboxes to PST from an Exchange 2010 environment. Thankfully Exchange 2010 SP1 had been deployed so I had access to the New-MailboxExportRequest series of cmdlets. Here’s what I came up with:

$ou = "nwtraders.msft/Users/Left"
$mailboxServer = "LONEX01"
$destinationUNC = "\\LONFS01\MBOX$\"

$mailboxList = Get-Mailbox -OrganizationalUnit $ou -Server $mailboxServer
$mailboxList | foreach-object {
New-MailboxExportRequest -FilePath $($destinationUNC)$($_.Name).pst -Mailbox $_.Name -Name $_.Name
}

Continue reading Batch export Exchange mailboxes to PST