main logo

How to Complete Mailbox Migration with Bad Items in M365

Complete Mailbox Migration with Bad Items in M365
Fastrack Migration

Mailbox migration to Microsoft 365 is a critical process for organizations transitioning to the cloud. However, administrators may encounter issues with bad items that cause migrations to fail or remain incomplete. This guide explains how to handle bad items during mailbox migrations using PowerShell, including how to troubleshoot errors, increase limits, and finalize the migration successfully.

What Are Bad Items in Mailbox Migration?

Bad items refer to corrupt or incompatible data within a mailbox that cannot be migrated to M365. These may include:

  • Corrupt Messages: Emails with incomplete metadata.
  • Large Attachments: Files exceeding size limits.
  • Invalid Calendar Entries: Recurring meetings with invalid patterns.
  • Folder Structure Issues: Broken folder hierarchies or hidden items.

When migration tools encounter such data, the process may stop, leaving mailboxes incomplete.

Common Error Messages During Migration

Administrators may see the following errors during migrations:

  • ErrorSummary: Describes migration failures due to data consistency problems.
  • Data Consistency Score Errors: Indicate data integrity issues.
  • Bad Item Limit Exceeded: Stops migration when the predefined threshold is crossed.

Example Error:

Error: MigrationPermanentException: TooManyBadItemsPermanentException.

This means the bad item count exceeded the default limit, preventing migration completion.

Steps to Complete Mailbox Migration with Bad Items

Follow these steps to resolve migration issues and complete the process:

Step 1: Analyze the Migration Batch

Run the following command to check the migration status and identify mailboxes with errors:

Get-MigrationUser -BatchId “<BatchName>” | Get-MigrationUserStatistics -IncludeReport | Select-Object DisplayName,Status,ErrorSummary

  • Replace <BatchName> with the name of your migration batch.
  • Review the ErrorSummary field for details about the errors.

Step 2: Increase the Bad Item Limit

Set a higher limit to allow the migration to continue despite bad items:

Set-MigrationBatch -Identity “<BatchName>” -BadItemLimit 100

  • Adjust the BadItemLimit value as needed (default is 0).

Step 3: Complete the Migration Batch

Force the completion of the migration batch:

Complete-MigrationBatch -Identity “<BatchName>”

  • This command finalizes the migration, ignoring the specified bad items within the set limit.

Step 4: Verify Migration Status

Confirm that the migration is successful:

Get-MigrationBatch -Identity “<BatchName>”

  • Look for a Status field showing “Completed.”

Advanced Troubleshooting: Export Bad Items for Review

If errors persist, export detailed reports to analyze problematic items:

Get-MigrationUserStatistics -Identity “<UserPrincipalName>” -DiagnosticInfo “IncludeReport” | Export-Csv -Path “C:\BadItemsReport.csv”

  • Replace <UserPrincipalName> with the affected mailbox name.
  • Review the CSV file to identify corrupt items.

Repair Corrupt Mailboxes (Optional)

For severe data consistency issues, use the mailbox repair tool:

New-MailboxRepairRequest -Mailbox “<UserPrincipalName>” -CorruptionType FolderView

  • Replace <UserPrincipalName> with the mailbox name.
  • This command targets specific corruption types such as FolderView errors.

When to Consider Re-Migration?

If the corruption persists despite repairs, administrators may need to:

  • Export Mailboxes to PST: Export problematic mailboxes locally.
  • Clean Up Data: Remove invalid items manually.
  • Reimport to M365: Reattempt migration with cleaned data.

Key Considerations for Mailbox Migration with Bad Items

  • Backups: Always create mailbox backups before proceeding.
  • Impact Analysis: Evaluate whether ignoring bad items affects business-critical data.
  • Testing: Test migrations on a sample batch before applying changes to larger groups.
  • Compliance Requirements: Confirm if compliance policies require specific data preservation.

Frequently Asked Questions

1. What is the default bad item limit for migrations?

The default limit is 0. Any bad item causes migration failure unless a higher limit is set.

2. How do I handle corrupted calendar entries?

Use the New-MailboxRepairRequest tool to fix calendar-specific corruption.

3. Can I exclude specific folders during migration?

Yes, use the ExcludeFolders parameter when creating a migration batch to skip problematic folders.

Final Thoughts

Completing mailbox migration with bad items in Microsoft 365 requires careful analysis, increased bad item limits, and troubleshooting using PowerShell commands. Administrators should balance migration completion against potential data loss and use repair tools when necessary.

Need Help with Microsoft 365 Migration?

Medha Cloud offers expert Microsoft 365 migration services to ensure seamless transitions, even with complex data challenges. Contact us today to simplify your migration process and optimize your cloud environment.

Reach us at:

  • India: +91 93536 44646
  • US: +1 646 775 2855
  • Websitewww.medhacloud.com
  • Email: info@medhacloud.com
Benjamin Gbolaru
Benjamin Gbolaru
I'm Benjamin, a Microsoft 365 Specialist, helping small and large businesses deploy, configure, and secure M365 environments to maximize the benefits of Microsoft tools. With sound expertise in driving cloud adoption, identity and access management (IAM), security monitoring, system reliability, and proactive troubleshooting.
Fastrack Migration
Share
Contents

Related Articles

medhacloud logo
USA:
Medha Cloud Solutions LLC
30 N Gould St Ste R, Sheridan, WY 82801,
Phone: +1 646 775 2855

India:
Medha Cloud Solutions Private Limited
#74, 7th Cross, Krishna Garden InCity Layout. Chikka Kammanahalli, Banneraghatta Road, Bangalore 560083
Phone:+91 93536 44646

E-Mail: sales@medhahosting.com
©Medha Cloud 2024. All rights reserved.