How to export a PST from an Exchange 2010 with Powershell

First of all, we nee to create a share where to send our pst’s export task
Credo una condivisione dove andrò a destinare i miei pst.
After that i need to assign the NTFS to the group Exchange Trusted Subsystem
Now we need to assign the Mailbox Import Export role to  Administrators group.
NewManagementRoleAssignment Role “Mailbox Import Export” User Administrators
now we are ready to issue the export command:
 This is an example :
[PS] C:\>NewMailboxExportRequest Mailbox alan.reid FilePath “\\FQDN\Share\esphoex2010apstalan.reid.pst”
To see the status of our export request this is the command:
To remove an export request :
Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest
In our case, we’ve had some “failed” export . So now we need to understand the reason why .
this is the command:
Get-MailboxExportRequest -status failed | Get-MailboxExportRequestStatistics -IncludeReport | Format-List > c:\report.txt
Now we can open the report of failed tasks and see why is failed..
In our case, we had some problems with AV scan that locked the PST destination file…