/
/

How to Migrate Exchange Online Mailboxes Without Downtime

by Lauren Ballejos, IT Editorial Expert
How to Migrate Exchange Online Mailboxes Without Downtime blog banner image

This guide explains how to perform an Exchange Online migration. This allows you to migrate exchange online mailboxes without downtime between Microsoft 365 tenants or with on-premises Exchange servers without disrupting mail flow. It covers both migrating user mailboxes and shared mailboxes.

Prerequisites for Exchange Online mailbox migrations

MSPs and internal IT administrators must be able to seamlessly migrate Exchange Online mailboxes between tenants or configurations without impacting user access. This must be done without mailbox lockouts or sync delays, while ensuring mail continues to be delivered and received. Calendar items and other exchange data must also be retained across the migration.

The first thing you need to do before migrating mailboxes is to ensure that you have a full backup of all affected data. This is best achieved using a comprehensive Microsoft 365 cloud backup solution that is designed for SaaS backup.

You should also recognize that a zero-downtime (or as close as is practically possible to it) migration requires planning. This includes having the relevant licenses available in the target tenant, and having reviewed and tailored any online scripts to match your unique environment to prevent unexpected behavior during the multi-stage process. A clear understanding of the migration process as outlined by Microsoft is critical to success.

Depending on your use case, you will also need global admin access, access to PowerShell (with the Exchange Online Management Module), and Azure AD Connect (if working with hybrid on-premises Exchange servers).

Step 1: Audit mailboxes for readiness

Before you migrate your mailboxes, you should understand where and what they are. To list all active mailboxes in PowerShell, use the following command:

Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName, PrimarySmtpAddress, ArchiveStatus

You can then check the size and limits for a specific mailbox by running:

Get-MailboxStatistics -Identity [email protected] | Select-Object DisplayName, TotalItemSize, ItemCount

Step 2: Enable MRS proxy for hybrid or staged migrations

If performing a hybrid or staged migration, you’ll need to enable the MRS proxy endpoint with the following PowerShell command:

Set-WebServicesVirtualDirectory -Identity “Server\EWS (Default Web Site)” -MRSProxyEnabled $true

You can validate that this was successful by running:

Get-WebServicesVirtualDirectory | FL Identity,MRSProxyEnabled

This is required for mailbox moves between on-premises Exchange and Exchange Online, or between tenants using remote PowerShell moves.

Step 3: Prepare the target environment

Before you continue, you should ensure the target environment has the necessary capacity and licenses for the migration, and that the end-user is informed. You will then need to:

  • Create user accounts and assign matching UPNs
  • Assign mailbox licenses to target users in Microsoft 365
  • Set up accepted domains and email aliases

You can also optionally provision auto-forwarding for the affected addresses:

Set-Mailbox -Identity [email protected] -ForwardingSmtpAddress [email protected] -DeliverToMailboxAndForward $true

If you are concerned about offline caching issues with Outlook clients (for example, drastically increasing the size of a mailbox where a user’s disk space may be limited), you can deploy scripts to change offline caching behavior by modifying the registry values located at:

HKEY_CURRENT_USER\Software\Microsoft\Office\<version>\Outlook\OST

If you will be reconfiguring DNS as part of your migration, consider lowering your TTL in advance so that changes to MX, Autodiscover, and SPF records are quickly applied. You may also need to configure Outlook Autodiscover redirects for clients using Group Policy if those configurations are changing for end-users.

Step 4: Perform pre-stage mailbox migration

Exchange Online mailbox migrations can be done in batches using the New-MigrationBatch cmdlet, using a CSV file as the source that lists the source mailboxes that are ready to be migrated. The CSV file should be in the following format:

EmailAddress 

[email protected] 

[email protected]

You can then run the migration using the file (updating the path to the file path on your system):

New-MigrationBatch -Name “Batch01” -SourceEndpoint “SourceTenantEndpoint” -CSVData ([System.IO.File]::ReadAllBytes(“C:\Users\admin\Desktop\mailboxes.csv”)) -TargetDeliveryDomain “targetdomain.onmicrosoft.com” -AutoStart -AutoComplete:$false

Validate the batch by running Get-MigrationBatch and Get-MigrationUser, replacing Batch01 with the name of the batch.:

Get-MigrationBatch

Get-MigrationUser -BatchId “Batch01”

Step 5: Cutover and complete migration

Do not continue to this step until you are ready for the cutover.

You can monitor the status of migration batches by running:

Get-MigrationBatch | Format-Table Status

When you are ready to finalize and complete the migration process, run Complete-MigrationBatch:

Complete-MigrationBatch -Identity “Batch01”

Again, replacing Batch01 with the name of the batch you are ready to complete.

Step 6: Seamlessly reconfigure client access

Provided the Autodiscover redirect is correctly configured, Outlook clients will automatically detect the new mailbox. You can set Outlook clients to follow the HTTP redirect automatically in the User Configuration > Administrative Templates > Microsoft Outlook > Account Settings > Exchange > AutoDiscover Group Policy Object.

It may be necessary to flush DNS and restart Outlook for some changes to be applied, which can be done by remotely deploying scripts that run the ipconfig /flushdns command and the taskkill /im outlook.exe /f commands on Windows clients.

What about migrating shared mailboxes to Exchange Online?

This process also applies to migrating shared mailboxes in Exchange Online.

Additional considerations and troubleshooting Exchange Online migrations

When finalizing the scripts that you will use for your migration, you should ensure that:

  • Shared mailboxes will be migrated with the correct permissions intact
  • If third-party tools are used, that they are carefully coordinated to eliminate downtime
  • End-user profiles are updated via MDM to avoid the need for manual intervention
  • Send As/Send on Behalf and other permissions are recreated in the target tenant if required
IssueCauseResolution
Outlook prompts for new profileAutodiscover misconfiguredCheck DNS and GPO redirect settings
Email not flowingMX not updatedConfirm DNS propagation
Forwarding loopsForward-to-self misconfiguredDisable dual-delivery temporarily
License error in targetNo license assignedAssign M365 mailbox license in advance

Synchronization issues can be traced using the Exchange Admin Center and PowerShell logs.

NinjaOne streamlines complex zero-downtime mailbox migrations

Mailbox migrations are a stressful task for any IT administrator or MSP: It is a complex, multi-stage process that can be error-prone due to configuration variations, and even brief outages can result in missed messages and frustrated users.

NinjaOne assists with both the server-side and client-side tasks associated with Exchange Online migrations, allowing you to execute pre- and post-migration scripts on end-user devices to ensure they receive the necessary configuration changes, at the moment they are required. Logs can be monitored for failures, so that mail flow problems or user authentication issues can be preemptively addressed.

Functionality such as device and user tagging also assists with seamless migrations. You can tag users by migration status (staged, migrated, or pending), and automated actions can also be taken on a successful migration, such as flushing DNS, removing old Outlook profiles, or resetting other configurations. Every action and outcome is highly visible, logged in the NinjaOne dashboard so that full oversight and control over every phase of the migration process is maintained.

Quick-Start Guide

NinjaOne offers migration capabilities, but with some important limitations:

1. Migration Approach:

– NinjaOne does not recommend using their SaaS Backup as a primary migration tool– They can back up from one account and restore to another individual account (within the same tenant)– This is essentially a 1:1 restore, not a mass migration solution

2. Migration Features:

– Can migrate emails between accounts in the same tenant– Preserves original date and time of emails– Supports migrating to different email providers (Gmail, Microsoft 365, others)– Folder hierarchy is only preserved when restoring to the default folder

3. Limitations:

– Does not migrate configurations or settings– Migrating using their platform will take considerable time and effort– Not recommended for large-scale migrations

For a comprehensive, zero-downtime migration of Exchange Online mailboxes, we recommend consulting with a specialized migration service or Microsoft’s native migration tools, as NinjaOne’s solution is more of a backup and restore function rather than a dedicated migration tool.

You might also like

Ready to simplify the hardest parts of IT?