Tuesday 23 February 2016

How to Export Exchange 2010 Mailboxes to PST Using Powershell


How to Export Exchange 2010 Mailboxes to PST Using Powershell


Microsoft Exchange 2010 server introduces a new set of PowerShell commands to export Exchange 2010 mailboxes to PST for Exchange 2010.

   1. By default, no user is allowed to Import/Export the mailboxes from Exchange PowerShell. In order to view or run Import/Export Cmdlets in Exchange PowerShell, you need to be given explicit permission.

In order to provide a user with permission to Import and Export, you need to run the following command from Exchange Management Shell. You can also assign this permission to a group if necessary using the -Group option:

New-ManagementRoleAssignment –Role “mailbox import export” –User “USER1”



2.     Next we need to create the network share that will be used as the file path for the exported PST files.  All that is required here is a network share that the Exchange Trusted Subsystem group has read/write permission to.




3.     With everything configured properly we can now use New-MailboxExportRequest to start the mailbox export.  The only two required parameters for the command are the file path to the export PST file, and the name of the mailbox to export.

          New-MailboxExportRequest -Mailbox username -FilePath \\SERVERNAME\Psts\Scott.pst




4.     To view the status of the request you can see the progress of all mailbox export requests is to pipe Get-MailboxExportRequest into the Get-MailboxExportRequestStatistics cmdlet.
Get-MailboxExportRequest | Get-MailboxExportRequestStatistics



Note: Please check the folder weather the PST is copied properly or not, If its copied compare the size of PST with mailbox size.

5.     When a mailbox export request is completed it remains on the server until it is removed by an administrator using Remove-MailboxExportRequest
        




6.     And to clear all completed mailbox export requests from Exchange run the following command.
         Get-MailboxExportRequest | where {$_.status -eq "Completed"} | Remove-MailboxExportRequest