Categories: Exchange

Exchange 2013 – TooManyMissingItems or TooManyBadItems

During Microsoft Exchange 2010 to Exchange 2013 Migration one of the steps is to migrated all mailboxes from old servers to new servers. Unfortunately with large number of mailboxes a lot of possible things can go wrong during New-MoveRequest.

Problem description

By moving lots of mailboxes from one server to another by using either ECP or EMS you're going to hit one o 2 potential problems:

TooManyBadItemsPermanentException

TooManyMissingItemsPermanentException

While the messages are quite drastic there's no need to panic. Usually the errors mean there are corrupted items within the mailbox but most of the time those are some broken/outdated calendar entries or stuff that's long time gone and not needed but still somehow pending in the mailbox.

Solution

First we need to find out what mailboxes are affected. We can use very useful combination of PowerShell commands (Get-MoveRequest and Get-MoveRequestStatistics)

Get-MoveRequest | Get-MoveRequestStatistics | sort StatusDetail, PercentComplete,TargetDatabase | ft -a DisplayName, Alias, BatchName, SourceDatabase, TargetDatabase, Status, StatusDetail, TotalMailboxSize, BytesTransferedPerMinute, PercentComplete, Failure*,Message,PercentComplete,largeitemsencountered,baditemsencountered

This little command gives total overview of all mailboxes that were committed for move, and their current status: Completed, InProgress or Failed. For our scenario most important columns are FailureType and BadItemsEncountered which shows us why our mailbox move has failed. After finding out the mailboxes having problems with move we need to asses if we should ignore errors and simply proceed straight to fix or should we verify the cause and try to find the solution. 

The choice is often a combination of both. Depending on time and circumstances it's often good approach to go thru couple of cases one by one and see what kind of problems are users having in their mailboxes. We can see issues within mailbox with command below:

Get-MoveRequest  | Get-MoveRequestStatistics -IncludeReport | fl

The most important part of the command is IncludeReport switch. When run, command displays a whole log of what was happening during mailbox move. The most interesting part is left in the end where all errors are gathered for Administrator to see.

2015-09-21 22:16:40 [MAIL2] A missing item was encountered: Missing Item (IPM.Note) Subject:"Jeszcze dziś - Czeka na Ciebie prezent o wartości 179 zł", Folder:"Elementy usunięte"
2015-09-21 22:16:40 [MAIL2] A missing item was encountered: Missing Item (IPM.Note) Subject:"artykuł: Tu 17zł, tam 17zł, tylko po co", Folder:"Elementy usunięte"

Followed by an error message:

Fatal error TooManyMissingItemsPermanentException has occurred.

In our case A missing item was encountered: Missing Item (IPM.Note) was pointing to folder which is Deleted Items. Probable scenario here was that Outlook client failed to properly notify mailbox about deleted items so those items got somehow in weird state and are no longer needed. In which case we simply can ignore the problem and let Exchange ignore those items by running following commands:

get-moverequest  | set-moverequest -baditemlimit 10
get-moverequest  | Resume-MoveRequest

This commands essentially tell Exchange to simply skip the problematic items. If you're convinced there's no need to go one mailbox at a time you can use quicker solution:

get-moverequest -movestatus Failed | set-moverequest -baditemlimit 10
get-moverequest -movestatus Failed | Resume-MoveRequest

This command sets -BadItemLimit of 10 for all Failed move requests and forces it to start where it failed. Of course keep in mind that you may end up with more BadItems and you should be careful what you set, but generally you shouldn't expect there will be much you can do with what you find.

This post was last modified on March 20, 2016 12:24

Przemyslaw Klys

System Architect with over 14 years of experience in the IT field. Skilled, among others, in Active Directory, Microsoft Exchange and Office 365. Profoundly interested in PowerShell. Software geek.

Share
Published by
Przemyslaw Klys

Recent Posts

Upgrade Azure Active Directory Connect fails with unexpected error

Today, I made the decision to upgrade my test environment and update the version of…

2 months ago

Mastering Active Directory Hygiene: Automating Stale Computer Cleanup with CleanupMonster

Have you ever looked at your Active Directory and wondered, "Why do I still have…

3 months ago

Active Directory Replication Summary to your Email or Microsoft Teams

Active Directory replication is a critical process that ensures the consistent and up-to-date state of…

7 months ago

Syncing Global Address List (GAL) to personal contacts and between Office 365 tenants with PowerShell

Hey there! Today, I wanted to introduce you to one of the small but excellent…

12 months ago

Active Directory Health Check using Microsoft Entra Connect Health Service

Active Directory (AD) is crucial in managing identities and resources within an organization. Ensuring its…

1 year ago

Seamless HTML Report Creation: Harness the Power of Markdown with PSWriteHTML PowerShell Module

In today's digital age, the ability to create compelling and informative HTML reports and documents…

1 year ago