Skip to content

Complete mailbox migration with bad items

When you complete a mailbox batch with PowerShell, a confirmation prompt is showing that it encountered bad items. You can click Yes to All, and it will complete the mailboxes in the batch to Office 365, but not all of them. It will not complete the mailboxes with bad items. They need investigation because of the data consistency score. In this article, you will learn how to complete a mailbox migration with bad items.

Migrate mailbox batch encountered bad items

You are completing the migration batch with PowerShell, and a confirm prompt is showing the following.

Are you sure you want to perform this action?
Some users in migration batch “Migration Batch 03” have encountered bad items. Those users will not complete until their data loss has been approved. Please investigate these bad items to ensure that there is no unexpected data loss. If there is unacceptable data loss, please contact support.

Click on Yes to All, and the mailboxes without bad items will complete. The mailboxes with bad items will stay in sync but not complete. How do we approve the bad items and complete the mailbox move for the users?

Filter mailboxes in batch that need investigation

Filter the mailboxes that need investigation. These are the mailboxes with bad items. The result will also show the completed mailboxes with the investigate tag.

PS C:\> Get-MoveRequest -BatchName "MigrationService:Migration Batch 03" | Get-MoveRequestStatistics | Where {$_.DataConsistencyScore -like "*Investigate*"} | ft DisplayName,StatusDetail,DataConsistencyScore,PercentComplete

DisplayName   StatusDetail                   DataConsistencyScore PercentComplete
-----------   ------------                   -------------------- ---------------
Colin Sharp   StalledDueToTarget_DiskLatency Investigate                       95
Michelle Hill Synced                         Investigate                       95
Alan Hamilton Completed                      Investigate                      100
Fiona Alsop   Synced                         Investigate                       95

If you did complete individual mailbox move request from the migration batch, filter them out. The completed mailboxes in the batch are not showing anymore.

PS C:\> Get-MoveRequest -BatchName "MigrationService:Migration Batch 03" | Get-MoveRequestStatistics | Where {$_.DataConsistencyScore -like "*Investigate*" -and $_.StatusDetail -notlike "*Completed*"} | ft DisplayName,StatusDetail,DataConsistencyScore,PercentComplete

DisplayName   StatusDetail                   DataConsistencyScore PercentComplete
-----------   ------------                   -------------------- ---------------
Colin Sharp   StalledDueToTarget_DiskLatency Investigate                       95
Michelle Hill Synced                         Investigate                       95
Fiona Alsop   Synced                         Investigate                       95

Skip the bad items with the Set-MoveRequest cmdlet and -SkippedItemApprovalTime switch. After running the cmdlet, a synchronization will occur, and the mailbox will complete.

PS C:\> Set-MoveRequest -Identity "Colin Sharp" -SkippedItemApprovalTime $(Get-Date).ToUniversalTime()

PS C:\> Set-MoveRequest -Identity "Michelle Hill" -SkippedItemApprovalTime $(Get-Date).ToUniversalTime()

PS C:\> Set-MoveRequest -Identity "Fiona Alsop" -SkippedItemApprovalTime $(Get-Date).ToUniversalTime()

Verify mailboxes with bad items got completed

Run the cmdlet to get the mailboxes with bad items and check if they are completed.

PS C:\> Get-MoveRequest -BatchName "MigrationService:Migration Batch 03" | Get-MoveRequestStatistics | Where {$_.DataConsistencyScore -like "*Investigate*"} | ft DisplayName,StatusDetail,DataConsistencyScore,PercentComplete

DisplayName   StatusDetail DataConsistencyScore PercentComplete
-----------   ------------ -------------------- ---------------
Colin Sharp   Completed    Investigate                      100
Michelle Hill Completed    Investigate                      100
Fiona Alsop   Completed    Investigate                      100

The mailboxes with bad items in the batch are completed with success to Exchange Online.

Filter migration batches with bad items

In the previous steps, we looked at how to skip bad items for a individual mailbox. What if you want to skip all the mailboxes in the batch?

Get the migration batches that need investigation. Have a look if the SkippedItemApprovalTime value is present. In our example, one of the migration batches value is empty.

PS C:\> Get-MigrationBatch | Where {$_.DataConsistencyScore -like "*Investigate*"} | ft Identity,DataConsistencyScore,SkippedItemApprovalTime


Identity             DataConsistencyScore SkippedItemApprovalTime
--------             -------------------- -----------------------
Migration Batch 01   Investigate          28/08/2020 10:24:17    
Migration Batch 02   Investigate          28/08/2020 10:37:04    
Migration Batch 03   Investigate          28/08/2020 10:57:21    
Migration Batch 04   Investigate          28/08/2020 10:57:34    
Migration Batch 05   Investigate              
Migration Batch 06   Investigate          28/08/2020 10:57:48  

Let’s skip the bad items for the migration batch with the name Migration Batch 05.

PS C:\> Set-MigrationBatch -Identity "Migration Batch 05" -ApproveSkippedItems

Verify if the SkippedItemApprovalTime value is shown.

PS C:\> Get-MigrationBatch -Identity "Migration Batch 05" | ft Identity,SkippedItemApprovalTime

Identity           SkippedItemApprovalTime
--------           -----------------------
Migration Batch 05 28/08/2020 11:31:43

Keep reading: Get move request batch in Exchange Online »

Conclusion

In this article, you learned how to complete mailbox migration with bad items. Run Exchange Online PowerShell to connect to the organization. Filter the move request mailboxes in the batch with bad items. Complete the mailbox migration with bad items, as shown in the article. Verify the mailbox migration, and you will see that the mailboxes are completed.

Did you enjoy this article? You may also like Hybrid Configuration Wizard fails to connect. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 3 Comments

  1. Hola ALi consulta esto quiere decir que todos los correos se migraron, excepto lo que tienen problema, y solo no se va a completar a menos que lo hagas manual.

  2. Sorry. The issue is to FIX and not to skip the errors. We have 1680 errors and do NOT want to skip these items.
    That is NOT a solution.

    1. You can check the mailbox migration report and see what’s happening to fix the issues. Then, correct the situation and re-migrate or resume/retry when possible.

      Most likely, there are corrupt permissions or calendar item inconsistencies, and you will approve skipped items manually, as shown in the article.

Leave a Reply

Your email address will not be published. Required fields are marked *