How to migrate individual on-premises mailboxes and make them cloud-only in a hybrid deployment
Problem:
You need to set up specific mailboxes as cloud-only after their migration from an on-premises Exchange server in a hybrid environment.
Solution:
Follow the steps below to change selected on-premises mailboxes to the Office 365 ones:
- Prepare the AD synchronization process for all users (mailboxes) planned to be migrated to the cloud. See this article to learn more.
- 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.
Info
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).
- Run the migration for chosen mailboxes.
- Once the migration is complete, all migrated users will have active mailboxes both on the on-premises Exchange server and in the cloud.
Important
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.
- Start with the on-premises mailbox cut-off procedure:
- Open the Exchange Management Shell (EMS) as an administrator and execute the following cmdlet:
Disable-Mailbox -identity <UserToCutOff>
where <UserToCutOff> is any value that uniquely identifies the mailbox (e.g. alias, email address, UPN, Id, etc.). - Start the PowerShell console as an administrator and connect to Exchange Online by executing the following cmdlet:
Connect-ExchangeOnline
A sign-in window will appear. Sign in with your Microsoft 365 admin credentials (Recipient Management role permissions or higher are required). If you encounter any errors at this point, see this article for additional guidance and troubleshooting. - Run the cmdlet:
Get-Mailbox <MailboxToCutOff> | fl ExchangeGuid
where <MailboxToCutOff> is the on-premises mailbox to be cut off from the mail flow. - You should receive the GUID of the mailbox, for example:
ExchangeGuid: 73x1a5132-8339-4ec3-ad37-10drda984378Copy the ExchangeGuid value. - 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 5d.Set-RemoteMailbox <UserToCutOff> -ExchangeGuid 73x1a5132-8339-4ec3-ad37-10drda984378
- Open the Exchange Management Shell (EMS) as an administrator and execute the following cmdlet:
- Once the changes have been applied, the only active mailbox will be the one residing in Microsoft 365 (Exchange Online).
| Related products: | CodeTwo Office 365 Migration |
| Categories: | How-To |
| Last modified: | June 30, 2026 |
| Created: | June 2, 2022 |
| ID: | 990 |



