skip to Main Content

Run the Hybrid Configuration Wizard (HCW)

In the previous article, we did install and configure Azure AD Connect to sync identities between on-premises and Office 365. In the next task, we will install and run the Hybrid Configuration Wizard (HCW). The HCW will ensure that we have an Exchange Hybrid deployment between two Exchange environments.

Hybrid Configuration Wizard progress

The general phases of the hybrid deployment configuration process are:

  1. Verifying prerequisites and performing topology checks
  2. Testing account credentials
  3. Making hybrid deployment configuration changes

Before you start

It’s good to know that you can configure one or more Exchange Servers for Hybrid. Open port 25 and 443 on the Exchange Servers. These Exchange Servers need to be Client Access Servers (CAS). In this example, we will use Exchange Servers EX01-2016 and EX02-2016 for Hybrid.

Read more: Exchange Hybrid firewall ports »

Exchange Servers up to date

Make sure that the Exchange Servers are on the latest version. Run Exchange Management Shell as administrator and run the Get-ExchangeServer cmdlet to check the Exchange Server versions. Always keep the Exchange Servers up to date.

[PS] C:\>Get-ExchangeServer | Format-Table Name, Edition, AdminDisplayVersion

Name         Edition AdminDisplayVersion
----         ------- -------------------
EX01-2016 Enterprise Version 15.1 (Build 2176.2)
EX02-2016 Enterprise Version 15.1 (Build 2176.2)

Enable MRS proxy

If you don’t complete this step before running the HCW, the HCW will enable MRS proxy. However, we recommend that you complete this step before running the HCW to ensure the IIS cache has time to clear before HCW validates the endpoint.

Run the Get-WebServicesVirtualDirectory cmdlet to check if MRS proxy is enabled.

[PS] C:\>Get-WebServicesVirtualDirectory | Format-Table Server,MRS*

Server    MRSProxyEnabled
------    ---------------
EX01-2016           False
EX02-2016           False

If it’s not enabled, enable the Mailbox Replication service (MRS) proxy on the EWS virtual directory.

[PS] C:\>Get-WebServicesVirtualDirectory -ADPropertiesOnly | Where {$_.MRSProxyEnabled -ne $true} | Set-WebServicesVirtualDirectory -MRSProxyEnabled $true

Another way to enable MRS proxy is with Exchange Admin Center.

Go to servers > virtual directories. Select All Servers and select EWS to filter on that type. Double-click on the EWS virtual directory in the list view.

Exchange Server on-premises virtual directories EWS

Click on general and Enable MRS Proxy endpoint. Do this for both the Exchange Servers.

Enable MRS Proxy endpoint

Remove previous Hybrid Configuration Wizard version

Go to Programs and Features in Control Panel and verify that a previous Hybrid Configuration Wizard is not already installed. If it is, uninstall it.

In the next step, you will download and install Office 365 Hybrid Configuration Wizard step by step.

Download Hybrid Configuration Wizard

You can run the Hybrid Configuration Wizard from other Windows Servers or a workstation. We recommend to sign in on an Exchange Server and install the HCW directly on the Exchange Server.

Start Internet Explorer and copy-paste the link (Microsoft). If you use other web browsers, it might not work as expected. That’s why we recommend using Internet Explorer.

Note: If you don’t get the HCW install window, read the article Office 365 Hybrid Configuration Wizard can’t start.

Install Hybrid Configuration Wizard

After you download the Hybrid Configuration Wizard setup, click Install.

Install Microsoft Office 365 Hybrid Configuration Wizard

The Microsoft Office 365 Hybrid Configuration Wizard installer is running.

Installing Microsoft 365 Hybrid Configuration Wizard

Run Hybrid Configuration Wizard

After downloading and installing, the first screen of the wizard shows up. Click next.

Hybrid Configuration Wizard

The Hybrid Configuration Wizard will detect the optimal Exchange Server. Click on next.

Hybrid Configuration Wizard on-premises Exchange Server organization

Change the on-premises Exchange administrator account credentials if you want. In our example, we will keep the same user that’s logged in. Click sign in and enter the Office 365 Exchange Online Account. Click next.

Hybrid Configuration Wizard on-premises Exchange account

It will gather both accounts’ information and check if it can connect to Exchange on-premises and Exchange Online. Click next.

If it fails, read the article Hybrid Configuration Wizard fails to connect.

Hybrid Configuration Wizard gathering configuration information

Choose Full Hybrid Configuration and select the checkbox Organization Configuration Transfer.

Hybrid Configuration Wizard hybrid features

Select Use Exchange Modern Hybrid Topology. Click next.

Do you want to keep mailboxes on-premises? Choose Exchange Classic Hybrid Topology because you want to configure Hybrid Modern Authentication in Exchange on-premises.

Note: Hybrid Modern Authentication with Exchange Modern Hybrid Topology (Hybrid Agent) is not supported.

Hybrid Configuration Wizard hybrid topology

Go to Active Directory Users and Computers. Create a service account svc-hybridmigrations. Make it a member of the group Organization Management.

Hybrid Configuration Wizard ADUC service account

Exchange Online will use the credentials to connect to your on-premises Exchange Server to move mailbox data to the cloud. It means that it will go to need some special privileges. If you enter your administrator account credentials here, it will work. But, it’s a member of the domain admins group and a powerful account for such a task.

Instead, you can create a special service account and add it to the Organization Management group. Fill in the credentials that you created in the above step. Click next.

Hybrid Configuration Wizard on-premises account for migration

The Hybrid Agent setup will start to download, install, register, and validate the Hybrid Agent. Click next.

Hybrid Configuration Wizard hybrid agent setup

Select Configure my Client Access and Mailbox servers for secure mail transport (typical). If you have an Edge Transport server, use the second option. Click next.

Hybrid Configuration Wizard hybrid configuration

Choose both Exchange Servers for the receive connector. Click next.

Hybrid Configuration Wizard receiver connector configuration

Choose both Exchange Servers for the send connector. Click next.

Hybrid Configuration Wizard send connector configuration

Select the certificate. Click next.

Hybrid Configuration Wizard transport certificate

Fill in the DNS name that represents your on-premises Exchange Organization for hybrid mail flow. This determines where Exchange Online Protection will connect to in order to route email from the cloud to the on-premises organization. Click next.

Hybrid Configuration Wizard organization FQDN

Choose Review the objects before transferring from on-premises to Exchange Online. Click next.

Hybrid Configuration Wizard organization configuration transfer

Click on the objects and check what’s different. Look closely and make a decision. We will skip these conflicts and leave them the way they are. Click next.

Hybrid Configuration Wizard organization configuration transfer - review objects

Click update and wait for the Hybrid Configuration Wizard to run.

Hybrid Configuration Wizard ready for update

You can get an error HCW8077 and HCW8092. Click retry.

If the retry button doesn’t work and you still get an error, read the article Tenant organization is dehydrated.

Hybrid Configuration Wizard configuring errors

Click update.

Hybrid Configuration Wizard rerun update

Congratulations! The Exchange Hybrid Configuration is a success. The hybrid services are now configured between Exchange Online in the Office 365 tenant and the on-premises Exchange environment. Click close.

Hybrid Configuration Wizard congratulations

Verify Hybrid Configuration Wizard installation

Go to Programs and Features and check that there is new software installed.

Hybrid Configuration Wizard programs and features

By default, the hybrid configuration log location is on the on-premises Mailbox server at:

%UserProfile%\AppData\Roaming\Microsoft\Exchange Hybrid Configuration
Hybrid Configuration Wizard AppData logs

You can always rerun the Hybrid Configuration Wizard whenever you make any changes to the environment.

In the next article, we will look at the tools to manage Exchange Hybrid.


In this article, you learned how to download, install and run the Hybrid Configuration Wizard. After running the Hybrid Configuration Wizard, there is a coexistence between the on-premises environment and Exchange Online.

Did you enjoy this article? You may also like HCW8078 – Migration Endpoint could not be created. Don’t forget to follow us and share this article.



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 26 Comments

  1. Hi Ali,
    I need to migrate an onpremise exchange to the cloud, but we want to use teams. Which type of migration should I use, classic or modern?
    Thank you very much for your tutorials

    1. You should choose Exchange full Classic Hybrid deployment.

      Modern Hybrid support is limited to Free/Busy and will not provide calendar integration from Teams to mailboxes on-premises.

  2. Hi Ali,

    First of all, over time, I found valuable and useful info on your site.

    Straight to the point… We have an exchange classic hybrid organization, in on prem we have 8 exchange servers 2013 mbx&cas and 2 edge servers. We are planning to add 2 more servers mbx&cas to store journaling mailboxes. We do not intent to change the mailflow in any way The question is do we have to run again Hybrid config wizard ?

    1. Hi Cristian

      I was reading your question and i am thinking like why you have the hybrid setup at this point. Do you have mailboxes in the exchange365 environment or is all on-prem ?

      The hybrid config wizard wants to know your primary on-prem server and some exchange configuration and routing. I guess the routing is now central configured on the on-prem server ?

      if that’s the case I don’t think you need to run the wizard again.

      If you change or upgrade your on-prem servers then it would be a good practice to run the EHW again.
      but hopefully Ali will ready your post and give you a straight answer.

  3. First of all, a very good article as always!
    i am running into the following error and can not find any on the internet about this issue. I hope you all have any suggestion …

    Its a hybrid wizard issue running for Exchange 2016 CU22
    Transport organisation config is needed for the teams calanders en contacts.


    2022.10.27 12:49:21.887 *ERROR* 11078 [Client=UX, Page=OCTChoice, fn=BuildOctConfig, Thread=11]
    System.AggregateException: Encountered errors while running organization configuration transfer. —> System.ArgumentOutOfRangeException: Could not find property ‘Action’ in object ‘Deserialized.Microsoft.Exchange.Data.Directory.Management.MalwareFilterPolicyPresentation’.

  4. Hello Ali,

    thank you for your courses, you re the best 🙂

    In this example, we will use Exchange Servers EX01-2016 and EX02-2016 for Hybrid Servers.
    My question is, where did you actually select or define EX01 and EX02 as Hybrid Servers ?
    By “Receive-Send Connector Configuration” section or not ?

    If we have 3 or 4 On-Oprem Exhange Servers with different versions, could we select as Hybrid Server only the newest versions of Exchange-Servers ? If yes where could we define this ?

    Thanks for your advices.

    1. Hi Emre,

      That’s correct.

      So you will select the newest Exchange Server versions from the Receive/Send Connector configuration.

      After running the Hybrid Configuration Wizard, you can check its configuration:

      1. Run Exchange Management Shell as administrator
      2. Run the below command:


      Note: If the Exchange Server is not yet licensed, you choose it in the first step. So it will download and install a free Exchange Hybrid license. Suppose your Exchange Server is already licensed; you select that Exchange Server (shown in this article).

  5. Hello Ali,

    How are you?

    Very good content. Taking advantage of the opportunity, you have already experienced the error HCW8099 – Command not recognized – Please verify you have the correct Management Rol assigned to your account?


  6. Thank you so much, your courses is incredible.

    I tried to run HCW today, I need to use Classic Full on my client, but the installer doesn’t show the option screen for Classic or Modern, it’s the only screen that doesn’t appear.

      1. Checking the log I found:

        Hybrid Connector Availability: False, Reason: Previous Migration Endpoint found with standard on-premises configuration.

        I searched on local servers in Exchange Powershell with Get-MigrationEndpoint but didn’t find anything, I connected to 365 with Connect-ExchangeOnline and found the old Endpoint, I removed it (Remove-MigrationEndpoint -Identity identity-name) and now I’ve successfully finished the wizard 🙂

  7. hi there,

    is it neccessary to configure Exchange Hybrid option within the AzureAD Connect first
    or will it be just ok to run the wizzard as you mentioned here?

    thanx for an advise..

    kind regards


  8. getting this same error for duplicate.
    there is nothing in enterprise apps in azure.
    we want to use the modern
    same external/internal url

  9. Hi Ali,

    Just wanted to start by thanking for all your document and so easy to follow! You save my butt a couple time. I was wondering if you could assist migrating from MX 2010 SP3 (has not had any release update installed on the original version for SP3) to Microsoft 365. Thank you in advanced!

    I am getting the errors below when running the wizard, the HCW8077 Tenant organization is dehydrated error resolved after running again:
    TargetServicePlan=’BPOS_S_E15_0′ TenantRelocationsAllowed=0 UMAvailableLanguages=[‘en-US’] UnblockUnsafeSenderPromptEnabled=1 VisibleMeetingUpdateProperties=’Location,AllProperties:15′ WebPushNotificationsDisabled=0 WebSuggestedRepliesDisabled=0 WhenChanged=’11/29/2021 3:29:11 PM’ WhenChangedUTC=’11/29/2021 10:29:11 PM’ WhenCreated=’6/11/2019 10:08:40 AM’ WhenCreatedUTC=’6/11/2019 5:08:40 PM’ WorkspaceTenantEnabled=1}
    2021.11.29 22:29:59.436 *ERROR* 10271 [Client=UX, Page=Configuring, fn=RunWorkflow, Workflow=Hybrid, Task=Initial, Phase=ValidateConfiguration, Thread=18] FINISH Time=269.0ms Results=FAILED – (Validation Failure)
    2021.11.29 22:29:59.438 *ERROR* 10273 [Client=UX, Page=Configuring, fn=RunWorkflow, Workflow=Hybrid, Task=Initial, Thread=18] FINISH Time=38.7s Results=FAILED
    2021.11.29 22:29:59.439 *ERROR* 10268 [Client=UX, Page=Configuring, fn=RunWorkflow, Workflow=Hybrid, Thread=18] FINISH Time=38.7s Results=FAILED
    2021.11.29 22:29:59.442 *ERROR* 10025 [Client=UX, Page=Configuring, fn=RunWorkflow, Thread=18] HCW8077 Tenant organization is dehydrated. Try running the Hybrid wizard again and if the issue persists contact support to remediate this issue.
    2021.11.29 22:29:59.444 *ERROR* 10025 [Client=UX, Page=Configuring, fn=RunWorkflow, Thread=18] HCW8001 Unable to determine the Tenant Routing Domain
    2021.11.29 22:29:59.445 *ERROR* 10025 [Client=UX, Page=Configuring, fn=RunWorkflow, Thread=18] HCW8092 One or more items failed validation during ‘Hybrid Initialization’ task. Please see log file for details.
    2021.11.29 22:29:59.446 10101 [Client=UX, Provider=Tenant, Thread=18] Disposing Runspace.
    2021.11.29 22:29:59.513 10101 [Client=UX, Provider=OnPremises, Thread=18] Disposing Runspace.
    2021.11.29 22:36:52.191 10044 [Client=UX, Thread=1] Opening
    2021.11.29 22:37:13.096 10044 [Client=UX, Thread=1] Opening C:\Users\itsupport\AppData\Roaming\Microsoft\Exchange Hybrid Configuration\20211129_222254.log

  10. Errors occur when configuring User Exchange Modern Hybrid Topology in an Exchange 2013 and Exchange 2019 coexistence environment.

    Is it because of Exchange 2013?

    2021.10.27 14:43:46.586 *ERROR* 10277 [Client=UX, Session=Tenant, Cmdlet=Remove-MigrationEndpoint, Thread=19]
    FINISH Time=948.6ms Results=PowerShell failed to invoke ‘Remove-MigrationEndpoint’: 끝점 ‘Hybrid Migration Endpoint – EWS (Default Web Site)’이(가) 한 개 이상의 일괄 처리와 연결되어 있기 때문에 제거할 수 없습니다. ex2013. {CategoryInfo={Activity=[System.String] Remove-MigrationEndpoint,Category=[System.Management.Automation.ErrorCategory] 1000,Reason=[System.String] CannotRemoveEndpointWithAssociatedBatchesException,TargetName=[System.String] ,TargetType=[System.String] },ErrorDetails=,Exception=[System.Management.Automation.RemoteException] End Point ‘Hybrid Migration Endpoint – EWS (Default Web Site)’ It can’t be removed because it’s connected to one or more batches.. ex2013.,FullyQualifiedErrorId=[System.String] [Server=YT3PR01MB5332,RequestId=4d22e1bd-4171-4998-b7d0-a98bc7f18e47,TimeStamp=2021-10-27 오후 2:43:46] [FailureCategory=Cmdlet-CannotRemoveEndpointWithAssociatedBatchesException] A7D26DFF,Microsoft.Exchange.Management.Migration.MigrationService.Endpoint
    2021.10.27 14:43:46.587 *ERROR* 10232 [Client=UX, Page=Configuring, fn=RunWorkflow, Workflow=Hybrid, Task=MRSProxy, Phase=Configure, Thread=19]
    Microsoft.Online.CSE.Hybrid.PowerShell.PowerShellInvokeException: PowerShell failed to invoke ‘Remove-MigrationEndpoint’: 끝점 ‘Hybrid Migration Endpoint – EWS (Default Web Site)’이(가) 한 개 이상의 일괄 처리와 연결되어 있기 때문에 제거할 수 없습니다. ex2013. {CategoryInfo={Activity=[System.String] Remove-MigrationEndpoint,Category=[System.Management.Automation.ErrorCategory] 1000,Reason=[System.String] CannotRemoveEndpointWithAssociatedBatchesException,TargetName=[System.String] ,TargetType=[System.String] },ErrorDetails=,Exception=[System.Management.Automation.RemoteException] 끝점 ‘Hybrid Migration Endpoint – EWS (Default Web Site)’이(가) 한 개 이상의 일괄 처리와 연결되어 있기 때문에 제거할 수 없습니다. ex2013.,FullyQualifiedErrorId=[System.String] [Server=YT3PR01MB5332,RequestId=4d22e1bd-4171-4998-b7d0-a98bc7f18e47,TimeStamp=2021-10-27 오후 2:43:46] [FailureCategory=Cmdlet-CannotRemoveEndpointWithAssociatedBatchesException] A7
    D26DFF,Microsoft.Exchange.Management.Migration.MigrationService.Endpoint.RemoveMigrationEndpoint} —> System.Management.Automation.RemoteException: 끝점 ‘Hybrid Migration Endpoint – EWS (Default Web Site)’이(가) 한 개 이상의 일괄 처리와 연결되어 있기 때문에 제거할 수 없습니다. ex2013.
    — 내부 예외 스택 추적의 끝 —
    위치: Microsoft.Online.CSE.Hybrid.PowerShell.PowerShellInvokeResult.CreateOrThrowMapped(String cmdlet, IReadOnlyDictionary`2 parameters, DateTimeOffset start, IPowerShellDataStreams dataStreams, ILogger logger, IPowerShellObject[] objects)
    위치: Microsoft.Online.CSE.Hybrid.Provider.PowerShell.PowerShellProvider.PowerShellInstance.Invoke(String cmdlet, IReadOnlyDictionary`2 parameters, Int32 millisecondsTimeout)
    위치: Microsoft.Online.CSE.Hybrid.PowerShell.RemotePowershellSession.Invoke(IPowerShell powershell, String cmdlet, IReadOnlyDictionary`2 parameters, Int32 millisecondsTimeout)
    위치: Microsoft.Online.CSE.Hybrid.PowerShell.RemotePowershellSession.RunCommandInternal2(String cmdlet, SessionParameters parameters, Int32 millisecondsTimeout, Boolean skipCmdletLogging)
    위치: Microsoft.Online.CSE.Hybrid.PowerShell.RemotePowershellSession.RunCommandInternal(String cmdlet, SessionParameters parameters, Int32 millisecondsTimeout, PowerShellRetrySettings retrySettings, Boolean skipCmdletLogging)
    위치: Microsoft.Online.CSE.Hybrid.Session.PowerShellTenantSession.RemoveMigrationEndpoint(IIdentity identity)
    위치: Microsoft.Online.CSE.Hybrid.StandardWorkflow.MRSProxyTask.Configure()
    위치: Microsoft.Online.CSE.Hybrid.Engine.Engine.c.b__12_2(ITaskContext c, ITask t)
    위치: Microsoft.Online.CSE.Hybrid.Engine.Engine.ExecutePhase(ILogger logger, TaskPhase phase, IWorkflow workflow, ITask task, Func`3 phaseFunction, LogEntryType typeForFalse)

      1. Hi, I’m trying to setup 2 Exchange hybrid into single M365 tenant. And I have the same error like JKYU.
        1st Exchange is already setup and working, but on the 2nd hybrid wizard end with this same error.
        What happend if i delete migration batches and run wizard again, it will delete the 1st endpoint?
        I want to keep both endpoints.
        Thank you.

        START Remove-MigrationEndpoint -Identity ‘Hybrid Migration Endpoint – EWS (Default Web Site)’ -Confirm: $false
        2022.12.01 13:07:08.169 10177 [Client=UX, Provider=Tenant, Thread=20] PowerShell Error Record: {CategoryInfo={Activity=[System.String] Remove-MigrationEndpoint,Category=[System.Management.Automation.ErrorCategory] 1000,Reason=[System.String] CannotRemoveEndpointWithAssociatedBatchesException,TargetName=[System.String] ,TargetType=[System.String] },ErrorDetails=,Exception=[System.Management.Automation.RemoteException] The endpoint ‘Hybrid Migration Endpoint – EWS (Default Web Site)’ cannot be removed because it is associated with one or more batches

  11. When I run the HCW it fails on Register Hybrid Agent. In the log it is telling me this:

    2021.08.18 13:17:44.082 10333 [Client=UX, fn=SendAsync, Thread=12] FINISH Time=543.0ms Results=BadRequest {“error”:{“code”:”InternalUrl_Duplicate”,”message”:”Internal url ‘’ is invalid since it is already in use”,”innerError”:{“date”:”2021-08-18T13:17:44″,”request-id”:”de4f1e8a-f045-4b31-b943-82fd1501805d”,”client-request-id”:”de4f1e8a-f045-4b31-b943-82fd1501805d”}}}
    2021.08.18 13:17:44.084 10407 [Client=UX, Thread=12] Updating Local Client Configuration File
    2021.08.18 13:17:44.107 10341 [Client=UX, Page=HybridConnectorInstall, Step=ConfigOrgRoute, Thread=12] FINISH Time=581.1ms Results=Failed

    What does this mean I have a duplicate URL. Yes my internal and external URL are the same. They are can be. You instructions for setup even show that. Can you tell me what else to look for?

    1. You get the Hybrid Agent registration error because you already have another Enterprise App published with the same URL.

      The best way is to rerun the Hybrid Configuration Wizard and select “Use Exchange Classic Hybrid Topology” instead of the “Use Exchange Modern Hybrid Topology”. This way, you will not get this error.

      1. We are also getting that error. Do you know of a way to check what Enterprise App is published with that same URL? Thanks for your help.

Leave a Reply

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