Exchange Server 2010 SP1 has a useful feature for importing PST files into mailboxes. However if you’ve used this feature a few times you may start to encounter problems with the imports failing, such as when the PST file has corrupt items in it.
Fortunately you can use the built-in logging of mailbox import operations to troubleshoot failed import requests. Each import request creates it’s own report for the import operation that can be accessed using the Get-MailboxImportRequestStatistics command.
Here is an example. First a mailbox import request is started using New-MailboxImportRequest.
[PS] C:\>New-MailboxImportRequest -FilePath \esp-ho-ex2010apstalan.reid.pst -Mailbox angela.hole Name Mailbox Status ---- ------- ------ MailboxImport exchangeserverpro.net/Company/Users/Head Of... Queued
Next, we can see the mailbox import request is in progress.
[PS] C:\>Get-MailboxImportRequest | Get-MailboxImportRequestStatistics Name Status TargetAlias PercentComplete ---- ------ ----------- --------------- MailboxImport InProgress Angela.Hole 10
By appending the -IncludeReport parameter to the command we get to see the log for the import operation.
[PS] C:\>Get-MailboxImportRequest | Get-MailboxImportRequestStatistics -IncludeReport Name Status TargetAlias PercentComplete ---- ------ ----------- --------------- MailboxImport InProgress Angela.Hole 10
If you run that command the output on screen may be too much to read, so instead you can output it to a text file instead if you wish.
[PS] C:\>Get-MailboxImportRequest | Get-MailboxImportRequestStatistics -IncludeReport | fl >report.txt
By the way here is another tip. If more than one mailbox import request is present then the above command will output all of them, not just the one you are interested in. To get the statistics for just the import request you want you need to know the “identity” of the mailbox import request. You can see that by running this command.
[PS] C:\>Get-MailboxImportRequest | ft name,identity -auto Name Identity ---- -------- MailboxImport exchangeserverpro.net/Company/Users/Head Office/Angela.HoleMailboxImport
That identity string is a bit long to type out. You can just copy and paste it if you want, or use this trick instead.
[PS] C:\>$id = get-user angela.hole [PS] C:\>Get-MailboxImportRequest -Identity $id.dn Name Mailbox Status ---- ------- ------ MailboxImport exchangeserverpro.net/Company/Users/Head Of... Completed
Anyway, back to the log that we want to look at. So once you’ve output the report for an import request to the screen or a text file you will see information such as this:
8/5/2011 11:31:18 PM [esp-ho-ex2010a] 'exchangeserverpro.net/Users/Administrator' creat ed request. 8/5/2011 11:31:32 PM [esp-ho-ex2010a] The Microsoft Exchange Mailbox Replication servic e 'esp-ho-ex2010a.exchangeserverpro.net' (14.1.323.0 caps:07) is examining the request. 8/5/2011 11:31:32 PM [esp-ho-ex2010a] Connected to target mailbox 'Primary (edbd7ee2-ac b6-413a-9736-2851e4f5d122)', database 'MB-HO-03', Mailbox server 'outlook.exchangeserve rpro.net' Version 14.1 (Build 323.0). 8/5/2011 11:31:32 PM [esp-ho-ex2010a] Request processing started. 8/5/2011 11:31:32 PM [esp-ho-ex2010a] Stage: CreatingFolderHierarchy. Percent complete: 5. 8/5/2011 11:31:38 PM [esp-ho-ex2010a] Merge initialized for mailbox 'Primary (edbd7ee2- acb6-413a-9736-2851e4f5d122)': 25 folders total. Estimated data size: 70167 items, 708. 3 MB (742,683,898 bytes). 8/5/2011 11:31:38 PM [esp-ho-ex2010a] Stage: CopyingMessages. Percent complete: 10. 8/5/2011 11:31:38 PM [esp-ho-ex2010a] Copy progress: 0/70167 messages, 0 B (0 bytes)/70 8.3 MB (742,683,898 bytes). 8/5/2011 11:31:39 PM [esp-ho-ex2010a] Merging folder '/Top of Personal Folders/Contacts [Contacts]' into '/Top of Information Store/Contacts [Contacts]'. 8/5/2011 11:31:40 PM [esp-ho-ex2010a] Copying 0 items, 0 B (0 bytes). Skipping 0 items, 0 B (0 bytes). 8/5/2011 11:31:40 PM [esp-ho-ex2010a] Stage: CopyingMessages. Percent complete: 10. 8/5/2011 11:31:40 PM [esp-ho-ex2010a] Copy progress: 0/70167 messages, 0 B (0 bytes)/70 8.3 MB (742,683,898 bytes).
If you’ve had an import request fail then this report should tell you why. Most of the time the failures will probably be due to corrupt mail items in the PST file you’re importing. If that is the case you can simply add the -BadItemLimit parameter to the New-MailboxImportRequest command. If you need to set the bad item limit higher than 50 you’ll also need to add the -AcceptLargeDataLoss parameter as well.
Hi Paul,
Quick question, what happen if let’s say the Import fail at 90%,
I would assume that 90% of the emails already imported must be sitting at target Mailbox). but then how can I make sure when I re-run the command it won’t be duplicated?
Thanks,
If you remove a Mailbox Import Request via Get-MailboxImportRequest -Status Completed | Remove-MailboxImportRequest -Confirm:$false
Is there any where else you can get the statistics of the Import once it has been removed ? I know there is a way to get Mailbox Move Statistics via the CAS server after it has been removed but not sure about Mailbox Import Statistics.
Pingback: Confluence: SKIDATA USA
As always, great advice.
Hi.
I have been googling for an anser to this question.
Is there a way to change the “limit” to import More than 10 PST files into the same User Mailbox?
When im trying to import pst files from one user into their own mailbox and their own -Targetfolder i can only import 10.
Mailboximport,0,1,2,3,4,5,6,7,8,9 and to go past this limit i need to “remove-mailboximportrequest” and here i will “loose” statistisk and reports. 🙁
Pingback: How to change and then resume a failed New-MailboxImportRequest | Mello's IT Musings