This is another common thing to do – import and export mailboxes.

In Exchange 2010 or 2013 to import a mailbox for the user must already exist in Exchange and you must already have the PST file you want to import.  However, there are some things to keep in mind before you start just importing:

  1. The PST file should be checked for corruption
  2. You can only import to Exchange from a shared location (ie. \\servername\sharename\johnsmith.pst)
    1. That shared location should be on the Exchange server – PST files do not like being accesses across a network connection
  • Copy the PST file to a system that already has Microsoft Office installed to and locate SCANPST.EXE (usually found in C:\Program Files (x86)\Microsoft Office\OfficeX\ where X is the version of Office installed).
  • Run SCANPST.EXE against the PST file and output a repaired copy (if necessary).
  • Copy the PST file back to the Exchange server to a folder already shared
    • for the sake of security you should make sure only administrators have access
    • if you don’t use a share location on the Exchange server make sure the Administrators group and the Exchange Trusted SubSystem have FULL CONTROL over the share
  • Open EMC
    • Make sure you have access:

      New-ManagementRoleAssignment -Role “Mailbox Import Export” -User Administrator

    • Import

      New-MailboxImportRequest -FilePath \\exchange\path\to\user.pst -Mailbox JohnSmith

    • Export

      New-MailboxExportRequest -Mailbox JohnSmith -FilePath \\exchange\path\to\user.pst

Once you have started the processes they run in the background.  You can run multiple imports and exports all at the same time.  For large mailboxes this can take a long time so it’s helpful to be able to see what’s going on.

If you don’t have a grip on the source and can’t run a mailbox repair against the mailbox before exporting consider adding some options to allow for corruption.

  • Import with some bad items or items to large for the limits imposed by the new Exchange server
    • New-MailboxImportRequest -FilePath \\exchange\path\to\user.pst -Mailbox JohnSmith -BadItemLimit 50

    • New-MailboxImportRequest -FilePath \\exchange\path\to\user.pst -Mailbox JohnSmith -LargeItemLimit 50

  • Or both:
    • New-MailboxImportRequest -FilePath \\exchange\path\to\user.pst -Mailbox JohnSmith -LargeItemLimit 50 -BadItemLimit 50

The purpose of this is to limit the number of times you need to import the information.  If you have to repeat the process the end user will end up with duplicated entries and have to run Mailbox Cleanup.  If it still fails with a threshold of 50 then you have to go to unlimited and add a third option;

  • With AcceptLargeDataLoss
    • New-MailboxImportRequest -FilePath \\exchange\path\to\user.pst -Mailbox JohnSmith -LargeItemLimit unlimited -BadItemLimit unlimited -AcceptLargeDataLoss

However, if you get to this stage you’re better off to attempt to repair the PST file or try to obtain a new PST file after a repair has been run against the mailbox for corruption.

Once you have started the import or export process you need to be able to monitor it’s status:

  • To see Import processes
    • Get-MailboxImportRequest | Get-MailboxImportRequestStatistics

  • To see Export processes
    • Get-MailboxExportRequest | Get-MailboxExportRequestStatistics

The import and export requests will hang around forever in the system until you clear them.

Get-MailboxImportRequest | where {$_.status -eq "Completed"}
Get-MailboxImportRequest | where {$_.status -eq "Failed"}

To remove them simply extend the command with | Remove-MailboxImportRequest or | Remove-MailboxExportRequest

Get-MailboxImportRequest | where {$_.status -eq "Failed"} | Remove-MailboxImportRequest

References : http://exchangeserverpro.com/exchange-2010-import-pst-files-mailboxes/

https://technet.microsoft.com/en-us/library/ff607310%28v=exchg.160%29.aspx