Export Email to pst with powershell

Steven · 2021-01-29 20:28 · 16 views · Exchange · old id 14

## Put the location of your CSV file

$mail  = Import-Csv -Path "D:\mail.csv"


## Loop all users in the CSV
Foreach ($user in $mail)
{
$Alias = $user.MailboxAlias
$pst = $user.pst
## in the File path spicify the location to export the mailbox, it will be easy i f you choose a location where your account has full control right to share drive
New-MailboxExportRequest -Mailbox $Alias -FilePath \\CAS-01\em\$pst
}

← Back to home