Powershell script to export Mailboxes
To export all mailboxes in exchange 2010 and exchange 2013
Copy the code below in a notepad window and save it as a powershell script.
$mailboxes = get-mailbox
foreach ($mailbox in $mailboxes) {
new-mailboxexportrequest -mailbox $mailbox -FilePath \\server\share\$mailbox.pst }
To export a single mailbox in Exchange 2010 and Exchange 2013.
New-MailboxExportRequest -Mailbox -FilePath \\\\.pst
If you get an error for command could not be recognized, you most probably do not have export import rights. Use the following command to assign rights.
New-managementroleassignment –Role “Mailbox Import Export” –User UserName