Quantcast
Channel: Practical 365
Viewing all articles
Browse latest Browse all 506

Exchange Server 2010 Mailbox Import Request Logging

$
0
0

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.

The post Exchange Server 2010 Mailbox Import Request Logging appeared first on Practical 365.


Viewing all articles
Browse latest Browse all 506

Trending Articles