So today, I had to export 4 mail accounts to PST files. So started looking around and being lazy, I thought I would do this through exchange.
so in the exchange console, I typed in
This gave me the modules that I could get but the module I wanted was not there, so I typed in.
Get-PSSnapin – registered
Still nothing. So typed in,
This gave me the module I wanted. I could then use the below command.
New-ManagementRoleAssignment -Role “Mailbox Import Export” -User “Administrator”
By default These have to be run.
New-MailboxExportRequest -Mailbox “Administrator” -FilePath \\Server\PST$\administrator.pst
This worked well but I could only do one at a time, which is fine. Below is how you can do it at once. I have not used it.
$user = read-host “Please enter the Username:”
$share = “\\Server\Networkshare”
New-MailBoxExportRequest -Mailbox “$user” -FilePath $share\$user.pst
I took the final commands from the below links.