Skip to content

Remove Exchange Hybrid Configuration

When all the mailboxes are in Exchange Online, and all the SMTP relay goes directly from the devices and applications to Office 365, we can remove the Exchange Hybrid Configuration. After that, keep only one Exchange Server for management purposes. In this article, you will learn how to delete Exchange Hybrid Configuration step by step.

Point MX records to Office 365

The MX record needs to point to Office 365, which is domain-com.mail.protection.outlook.com. Go through the article: Update MX records to Office 365.

Point Autodiscover record to Office 365

The Autodiscover record needs to point to Office 365, which is autodiscover.outlook.com. Go through the article: Autodiscover URL in Exchange Hybrid.

Remove Service Connection Point (SCP)

Remove the Service Connection Point (SCP) value on the Exchange Servers. This ensures that it will not return an SCP. Go through the article: Autodiscover URL in Exchange Hybrid.

Remove Hybrid Configuration

Remove the Hybrid Configuration object from Active Directory to prevent the Hybrid Configuration from being recreated in the future.

Run Exchange Management Shell as administrator. Next, run the Remove-HybridConfiguration cmdlet.

[PS] C:\>Remove-HybridConfiguration -Confirm:$false

Verify that the Hybrid Configuration is successfully removed. Run the Get-HybridConfiguration cmdlet, and the output will be empty.

[PS] C:\>Get-HybridConfiguration

Keep one Exchange Server

You should keep one Exchange Server on-premises for management purposes. Remove all other Exchange Servers to free up resources for other machines. Think about disk space, memory, and CPU. You don’t need to add a lot of disk space, memory, and CPU on the last Exchange Server. That’s because it will only be there for management purposes. There is no need to have a Database Availability Group or other High Availability options.

Note: Keep the Exchange Server with management purposes up to date with the latest Exchange Cumulative Update and Exchange Security Update.

Disable OAuth configuration

You have to disable OAuth from both on-premises and Microsoft 365.

Run Exchange Management Shell as administrator and run the below command to disable OAuth configuration from on-premises.

[PS] C:\>Get-IntraOrganizationConnector | Set-IntraOrganizationConnector -Enabled $false

Verify that OAuth is disabled from on-premises with the Get-IntraOrganizationConnector cmdlet. The Enabled column will show as False.

[PS] C:\>Get-IntraOrganizationConnector | Format-Table Name,Enabled,TargetAddressDomains

Name                                             Enabled TargetAddressDomains
----                                             ------- --------------------
HybridIOC - 5635832e-d272-46fa-8161-7bfcdfc9aaa2   False {exoip365.mail.onmicrosoft.com}

Run Windows PowerShell as administrator and connect to Exchange Online PowerShell.

PS C:\> Connect-ExchangeOnline

Run the below command to disable OAuth configuration from Microsoft 365.

PS C:\> Get-IntraOrganizationConnector | Set-IntraOrganizationConnector -Enabled $false

Verify that OAuth is disabled from Microsoft 365 with the Get-IntraOrganizationConnector cmdlet. The Enabled column will show as False.

PS C:\> Get-IntraOrganizationConnector | Format-Table Name,Enabled,TargetAddressDomains

Name                                             Enabled TargetAddressDomains
----                                             ------- --------------------
HybridIOC - 25ed1cea-670f-45c3-854e-e3a1d0a4651c   False {exoip.com}

Remove connectors in Exchange Online

The Hybrid Configuration Wizard created inbound and outbound connectors in Exchange Online. Follow the below steps to delete the connectors in Exchange Online:

  • Sign in to Microsoft 365 Exchange admin center
  • Expand Mail flow and click on Connectors
  • Delete the connectors named Inbound from <unique identifier> and Outbound to <unique identifier>
Remove Exchange Hybrid Configuration remove connectors

Remove organization relationship in Exchange Online

The Hybrid Configuration Wizard created an organization relationship. Follow the below steps to delete the organization relationship in Exchange Online:

Remove Exchange Hybrid Configuration remove organization relationship

Remove send connector in Exchange on-premises

The Hybrid Configuration Wizard created an outbound connector in Exchange on-premises. Follow the below steps to delete the send connector in Exchange on-premises:

  • Sign in to Exchange admin center
  • Expand mail flow and click on send connectors
  • Delete the outbound connector named Outbound to Office 365 – <unique identifier>
Remove Exchange Hybrid Configuration remove send connector

You can remove all the Exchange on-premises send connectors. That’s because the Exchange Server will not send emails anymore. Instead, the SMTP relay goes through Office 365 directly from the devices and applications.

Keep Exchange Hybrid deployment

Leave the Exchange Hybrid Deployment feature enabled in Azure AD Connect.

Remove Exchange Hybrid Configuration Exchange Hybrid Deployment

You successfully did remove Exchange Hybrid Configuration.

Read more: Install Exchange Security Update step by step »

Conclusion

You learned how to remove Exchange Hybrid Configuration step by step. When all mailboxes are in Office 365 and the SMTP relay goes through Office 365, it’s an excellent time to delete the Hybrid Configuration. Every step is essential, and you have to go through them all and ensure that the Hybrid Configuration is successfully removed. Don’t forget to keep one last Exchange Server for management purposes.

Did you enjoy this article? You may also like the course Exchange Hybrid. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 21 Comments

  1. Hi Ali,

    In my environment, I have an old server that already connects to Hybrid and I want to decommission it and replace it with a 2019 server. Can I apply these to decommission that server and install 2019 as a new server?

  2. What an excellent article, thank you for sharing. I am due to remove hybrid on a company soon for the first time and I was wondering. If they have multiple domain controllers for management, can we remove the only exchange server safely? Ideally, we would like to decommission their local exchange now that all mailboxes are in the cloud but keep the directory sync in place.

    Your expert opinion would be greatly appreciated.

  3. Why would you leave an exchange server still running? You can keep AD Connect to sync Identity, as long as you have the Exchange Schema installed in AD you can don’t have to do anything.

    Otherwise, you can just reconfigure AD Connect to use different attributes for mail. I have several customers who we do not have an exchange server yet still use local AD for identity management source.

  4. Hello Ali,

    First, great article. I have one question.

    My environment is split between two domains:

    – Domain “A”
    Where the Exchange installation and hybrid configuration reside
    – Domain “B”
    Where Azure AD Connect is configured with Office 365

    Domain “B” has linked mailboxes to users from domain “A”. All mailboxes have already been moved to Office 365, and domain “B” will no longer exist (along with the Exchange server installation).

    Would the steps be the same?

    1. A correction

      Domain “A” has linked mailboxes to users from domain “B”. All mailboxes have already been moved to Office 365, and domain “A” will no longer exist (along with the Exchange server installation).

  5. Hi Mr.Ali,

    we have hybrid environment (with SMTP relay from the Exchange Server),
    How we can send emails to external email id (partners) from Application through exchange server
    without exposing the application to office 365

  6. Hello Ali,
    very well done article. I have only one question for you. What happens if I don’t keep “Hybrid Deployment” option enabled during the last step with Azure AD Connect configuration ?
    Thank you.
    Best regards.

  7. Hi Ali,
    Thanks for your helpful articles!
    I have a question, we’re going the other way, migrating from O365 back to Exchange 2019. Unfortunately, I can’t find nothing how to remove hybrid mode in this case. The mailbox migration is finished and now we have to remove the Hybrid Configuration.
    Do you have experience with this?
    Best regards
    Mike

  8. Hi Ali. We have one Exchange 2010 server with many mailboxes. I have setup the minimal hybrid config and everything is working fine. We are only moving a few mailboxes to 365 via Remote Move and the remaining mailboxes are no longer relevant and won’t be moving to 365. I need to keep the Exchange 2010 server for archival purposes in case we need to get data from an old mailbox but I’ll use a PST export for that. The server however will not be connected to the Internet and we are no longer using the Active Directory objects. How do I remove the hybrid config without decommissioning the server so all of the management is done in 365? Thanks for your help.

  9. Good article…
    The instructions providen by Microsoft has a bad identity name example in the command Get-IntraOrganizationConnector which does not match current installations. Thx to your article I didn’t miss it.
    In the other hand I noticed that there is no mention about to keep, disable or remove on premises relationship to O365 which is still present after completing all the steps (Get-OrganizationRelationship in Exchange Management Shell ). Do you know if it safe to disable or remove it?
    It is safe to remove “Intra Organization connectors” as well instead of disable them?

  10. Hi Ali,
    Thank you for this write-up, great knowledge share. Much appreciate you taking the time to write this up.

  11. Dear,
    The hybrid setup is configured in my environment with a stand-alone ex2019 server now I decided to remove the hybrid setup and keep only the on-premise setup. Please suggest if the above method is suitable for this purpose or if any additional configuration is required.

  12. Ali,

    Excellent article my friend. Thanks for taking the time to share your wonderful knowledge. I would like to get your feedback if you don’t mind.

    In my organization, there is a division of it that was acquired by another company and one of the requirements was to migrate the email of that division to O365. In order to do that we set up Hybrid on our Exchange 2016 to easily migrate the mailboxes of the employees going away with this other company to O365. That part went well but now we have to remove the hybrid configuration.

    On the other hand, we are also planning to migrate to O365 the other part of our company…of course this will be to another/different O365 Tenant.

    The point now is that we are trying to figure out a way to break/remove the current hybrid configuration we had to do recently for the division acquired by this other company I mentioned above but being careful of breaking/removing the current hybrid configuration so that we can then setup again Hybrid to be able to migrate to O365 the remaining mailboxes that in this case belong to employees of the part of the company that stays on this end.

    Any particular recommendations? We do not want to brake/remove anything that we might need for our next hybrid configuration.

    Please advise when you have a moment. Thanks in advance for your feedback!

    Ray

    1. Glad to hear that, Ray.

      I had done this before and migrated mailboxes from Exchange on-premises to different Microsoft 365 tenants.

      You can follow the steps in the article to remove the Hybrid Configuration and the configurations that HCW configures in Exchange Online and Exchange on-premises.

      The next time you want to migrate the mailboxes to another Microsoft 365 tenant, run the Hybrid Configuration Wizard. It will create all the configurations in Exchange Online and Exchange on-premises.

Leave a Reply

Your email address will not be published. Required fields are marked *