main logo

How to Get Mailbox Migration Status with PowerShell

mailbox migration status
Fastrack Migration

Tracking mailbox migration status in Microsoft 365 is critical during migrations to ensure a smooth transition. While the Exchange Admin Center provides migration status, it is often delayed and challenging to interpret, especially when managing multiple migration batches. This article explains how to use PowerShell to monitor mailbox migration status and export reports to a CSV file for detailed analysis.

Why Monitor Mailbox Migration Status?

Mailbox migrations can involve hundreds of users, and tracking their progress ensures:

  • Early detection of errors.
  • Monitoring synchronization progress.
  • Ensuring successful migration completion.
  • Generating reports for compliance and audits.

Using PowerShell provides real-time updates and makes it easier to analyze large migration batches than relying on the graphical interface in the Exchange Admin Center.

Step-by-Step Guide to Check Mailbox Migration Status with PowerShell

Step 1: Connect to Exchange Online with PowerShell

  1. Open PowerShell on your computer.
  2. Install the Exchange Online Management Module (if not already installed): Install-Module -Name ExchangeOnlineManagement
  3. Import the module: Import-Module ExchangeOnlineManagement
  4. Connect to Exchange Online:

Connect-ExchangeOnline -UserPrincipalName admin@domain.com

    Step 2: Retrieve Migration Batch Information

    To view all migration batches, run:

    Get-MigrationBatch

    This command lists active migration batches along with their statuses.

    Step 3: Check Migration Status for Users

    To view details about individual mailboxes in a specific batch, use:

    Get-MigrationUser -BatchId “BatchName” | Select DisplayName, Status, PercentageComplete

    Replace “BatchName” with the actual name of your migration batch.

    Output Example:

    DisplayNameStatusPercentageComplete
    John DoeSyncing75%
    Jane SmithCompleted100%
    Mike JohnsonFailed0%

    Step 4: Export Migration Status to CSV File

    Export the migration report to a CSV file for easier review and sharing:

    Get-MigrationUser -BatchId “BatchName” | Select DisplayName, Status, PercentageComplete | Export-Csv -Path “C:\MigrationStatus.csv” -NoTypeInformation

    This creates a file named MigrationStatus.csv in the *C:* directory.

    Step 5: Check Detailed Migration Statistics

    For additional details, such as error messages, use:

    Get-MigrationUserStatistics -Identity user@domain.com | Select-Object DisplayName, Status, ErrorMessage

    To export detailed statistics for all users:

    Get-MigrationUser | Get-MigrationUserStatistics | Export-Csv -Path “C:\MigrationFullReport.csv” -NoTypeInformation

    Step 6: Disconnect Exchange Online Session

    When finished, disconnect the session to ensure security:

    Disconnect-ExchangeOnline

    Common Errors and Troubleshooting Tips

    Error MessagePossible CauseSolution
    “Cannot open mailbox”Permissions issueVerify the admin account has necessary roles.
    “Failed” status in migration batchSync or network issuesRestart migration and check connectivity.
    “Mailbox already exists”Duplicate migration attemptsRemove duplicate entries from migration batch.

    Benefits of Using PowerShell for Migration Tracking

    • Real-time updates: Faster and more accurate than the Admin Center.
    • Scalable reporting: Handles multiple batches and hundreds of users efficiently.
    • Customizable exports: CSV output allows integration with other tools and compliance reports.
    • Detailed error tracking: Provides insights into failures for quick troubleshooting.

    Frequently Asked Questions (FAQs)

    1. Can I track migration progress for multiple batches at once? Yes, use the command Get-MigrationUser without specifying a batch to view all users across batches.

    2. Do I need administrative permissions to use these commands? Yes, you need Exchange Administrator or Global Administrator permissions.

    3. How often should I check migration status? For large migrations, it’s recommended to check status every 15-30 minutes.

    4. What should I do if a migration batch fails? Check error messages using PowerShell and restart the migration batch if needed.

    Conclusion

    Monitoring mailbox migration status with PowerShell simplifies the process and provides real-time insights into migration progress. By exporting data to CSV files, administrators can easily track and report migration status, ensuring smooth transitions to Microsoft 365.

    Need Help Managing Microsoft 365 Migrations?

    Medha Cloud specializes in Microsoft 365 migration planning, execution, and support. Contact us today to streamline your migration process and minimize downtime.

    Contact Medha Cloud for expert assistance!

    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.