Knowledge Base

How to migrate individual on-premises mailboxes and make them cloud-only in a hybrid deployment


You need to set up specific mailboxes as cloud-only after their migration from an on-premises Exchange server in a hybrid environment.


Follow the steps below to change selected on-premises mailboxes to the Office 365 ones:

  1. Prepare the AD synchronization process for all users (mailboxes) planned to be migrated to the cloud. See this article to learn more.
  2. Make sure you’ve got the sufficient number of Office 365 licenses, and then use the program to automatically create target mailboxes and match them with source ones.


    The cloud mailboxes can be also created manually in the Microsoft 365 admin center of your Office 365 tenant (once the required synchronization process is complete).

  1. Run the migration for chosen mailboxes.
  2. Once the migration is complete, all migrated users will have active mailboxes both on the on-premises Exchange server and in the cloud.


    In case there are some unmigrated items (still residing on the source server), the Run delta migration option can be used to move them to the target one. Learn more

    Note that during the whole transition period when a user has two active mailboxes (on-premises and cloud-based), it is possible that if another user inside the same hybrid environment who uses a cloud-based mailbox sends an email to the migrated user, the message will be delivered and accessible only in the cloud-based mailbox (and not in its on-premises counterpart). This is the native behavior in the case of hybrid environments.

  1. Commence with the on-premises mailbox cut-off procedure:
    1. Open (in the Run as administrator mode) the Exchange Management Shell (EMS) and execute the following cmdlet:
      Disable-Mailbox -identity <UserToCutOff>
      where <UserToCutOff> is any value that uniquely identifies the mailbox (e.g. name, alias, email address, UPN, etc.).
    2. Start (in the Run as administrator mode) the PowerShell console and connect to Exchange Online by executing the following cmdlets:
      $LiveCred = Get-Credential
      Connect-ExchangeOnline -Credential $LiveCred


      It may happen you encounter an error, as shown in Fig. 1.

      Error when connecting to Exchange Online
      Fig. 1. Error when connecting to Exchange Online.

      If so, import the ExchangeOnline module first:

      Import-Module -Name ExchangeOnlineManagement
    3. Run the cmdlet:
      Get-Mailbox <MailboxToCutOff> | fl ExchangeGuid
      where <MailboxToCutOff> is the on-premises mailbox to be cut off from the mail flow.
    4. You should receive the GUID of the mailbox, e.g.:
      ExchangeGuid: 73x1a5132-8339-4ec3-ad37-10drda984378
      Copy the ExchangeGuid value.
    5. Return to the EMS window and run the following cmdlets:
      Enable-RemoteMailbox <UserToCutOff> -RemoteRoutingAddress <[email protected]>
      Here you need to provide the ExchangeGuid value retrieved in step 5c.
      Set-RemoteMailbox <UserToCutOff> -ExchangeGuid 73x1a5132-8339-4ec3-ad37-10drda984378
  2. Once the changes have been applied, the only active mailbox will be the one residing in Office 365 (Exchange Online).
Was this information useful?