Powershell commands:
Give yourself rights to Import Mailboxes (not turned on by default):
New-ManagementRoleAssignment –Role "Mailbox Import Export" –User Administrator
Import a single PST:
New-MailboxImportRequest -Mailbox Peter -FilePath exchangePSTarchiveoutlook.pst
Import Multiple Mailboxes:
This example imports all of the .pst files on a shared folder. Each .pst file name is named after a corresponding user’s alias, e.g.  peter.pst
Dir exchsvrPSTarchive*.pst | %{ New-MailboxImportRequest -Name Import20120527 -BatchName Import20120527 -Mailbox $_.BaseName -FilePath $_.FullName}
Check Status of all recent Imports:
Output Report of an Import to file
Get-MailboxImportRequestStatistics PeterImport20120527 -IncludeReport | fl > c:importsreport.txt
Output a Report of all currently Failed Imports
Get-MailboxImportRequest -Status Failed |  Get-MailboxImportRequestStatistics -IncludeReport | fl > c:importsallfailedreport.txt

Resume all failed Imports (try again)
Get-MailboxImportRequest -Status Failed |  Resume-MailboxImportRequest
Two reasons for Mailbox Import to fail:
1.   Large Items  –  There are emails larger than the message size limits you have set on the Exchange Transport components,  connectors, etc.
Since the default is 10MB,  any emails in the mailbox larger than 10MB will cause the import to fail.
Places to increase message size:
Set-TransportConfig -MaxReceiveSize 50MB -MaxReceiveSize 50MB
 Get-ReceiveConnector | Set-ReceiveConnector -MaxMessageSize 50MB
 Get-SendConnector | Set-SendConnector -MaxMessageSize 50MB
Wait 2 hours, or

Restart these services?

  • MSExchangeMailSubmission
  • MSExchangeTransport
  • MSExchangeMailboxAssistants
or Restart Exchange Server
2.   Bad Items  –  Corrupt messages in the PST.
May need to run ScanPST several/many times on each PST before it is marked as clean.
ScanPST is installed in ProgramFiles/Office  folder,  but is GUI only, no command-line.
cscanpst is a command line wrapper for ScanPST.
ScanPSTAll is a script that automates cscanpst/ScanPST combo so you can queue up a lot of files to repair.
To make a script that will run ScanPSTAll 20 times,  make a new batch file next to ScanPSTAll script and put this line in there 20 times:   call ScanPSTALL.cmd

3.  If all else fails  –  You can tell the importer to skip bad/large emails and continue on.  The bad/large emails will not be imported.

Add these parameters to the New-MailboxImportRequest command.
-BadItemLimit 100   -AcceptLargeDataLoss
"Exchange 2013 Mailbox Import Failed – How to deal with it" - By admin - - No Comments