Whilst testing out the new PST Import functionality in Office 365 recently I ran across an issue where my test data (dating back to 2001… rookie mistake in itself) included too many bad items, and the import failed before it really got started. The import wizard returned the following error “TooManyBadItemsPermanentException”. As I was just testing I wasn’t concerned with the number of bad items so wanted to import all of the data anyway, and in some cases in a live environment you may also want to import above the default 0 (yes, that’s right, Zero).
To do this you must first run the following in Exchange Online and find the import request that you need to retry.
Get-MailboxImportRequest | FL name, mailbox, status, whencreated, requestguid
You can then run the following command using the requestGUID of your import request found above to set the limit to an appropriate number:
Set-MailboxImportRequest -Identity <Your RequestGUID> -BadItemLimit 9999
You can either set your BadItemLimit variable to a numeric value if you know what you want this to be, or you can set it to “Unlimited” which does what it says on the tin.
Once you have set your BadItemLimit as you require you will then need to resume your ImportRequest using the following command:
Resume-MailboxImportRequest -Identity <Your RequestGUID>
You will see in the Import section of your Office 365 tenant. You can then monitor the progress as with a new import request.
I will be posting an end to end “How To” guide on using the Office 365 Import Utility in the coming weeks, but if you have any comments and/or questions please enter them in the comments section bellow, Tweet me @MikeParker365 or email at email@example.com.