Monday 12 September 2011

Exchange 2010 Mail Import

I have had my first go at importing mail into Exchange 2010. After exporting all the mailboxes manually using the PST export from Outlook, as ExMerge didn't work, i thought that it would be a simple process of using the new Microsoft Shell cmdlets. After creating a share out of the directory which holds the PST files, all I had to do was to run the following command;

New-MailboxImportRequest -Mailbox aliasname -FilePath \\server\folder\ailiasname.pst
(please note the Filepath is dependant on where you hold the .pst file)

However, when I ran the command, it seemed to work and then fail. The message complained that it failed after there were too many errors in the file. Its true this customer had mail problems in the past but I thought that as long as the exported .pst file finished exoprting without errors, the imprt shoudl be fine.
Even after I used the scanpst.exe tool which did find errors, it still failed. In the end to get round the issue I had to use the following extra switches.

New-MailboxImportRequest -Mailbox aliasname -FilePath \\server\folder\ailiasname.pst -AcceptLargeDataLoss -BadItemLimit unlimited

The unlimited option of the -BadItemLimit is optional and can be replaced with a number. I used 150 until I just went for unlimited to get the mail in. You will recieve a warning just after you press enter which states that you could lose data in the import becuase this is not the done way.
I was not comfortable in firing multiple import requests, so I would run one import and then run the following command to see when the import completes;

Get-MailboxImportRequest -Mailbox aliasname

No comments: