Hybrid Configuration Wizard (HCW) Fails with WinRM Connectivity Issue; EMS Connectivity Also Fails Despite SSL Certificate Configuration

Anonymous
2025-01-27T17:16:07.9433333+00:00

I am setting up a hybrid environment between an on-premises Exchange Server 2019 and Microsoft 365. The Hybrid Configuration Wizard (HCW) fails with the following error:

WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled and allows access from this computer.

Additionally, the Exchange Management Shell (EMS) fails to connect locally with a similar WinRM error. However, I can connect to the Exchange Server remotely and run commands like Get-Mailbox without issues.

Why does remote EMS connectivity work while local EMS connectivity fails?

HCW error

Exchange | Exchange Server | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2025-01-28T06:13:56.3466667+00:00

    Hello, @Bije,

    Welcome to the Microsoft Q&A platform!

    Based on your error message, you're encountering a WinRM configuration issue on your Exchange Server 2019. Here are a few steps to help troubleshoot and resolve this problem:

    1.Check WinRM Service Status: Ensure that the WinRM service is running on your Exchange Server. You can do this by running the following command in an elevated PowerShell session:

    Get-Service WinRM
    

    If the service is not running, start it with:

    Start-Service WinRM
    

    2.Configure WinRM: Run the winrm quickconfig command to configure WinRM with default settings. This command will start the WinRM service, set it to auto-start, and create a firewall exception for the current user profile. For more, refer to Installation and configuration for Windows Remote Management - Win32 apps | Microsoft Learn.

    winrm quickconfig
    

    3.Firewall Configuration: Ensure that the firewall on your Exchange Server allows WinRM traffic. You can create a firewall rule to allow WinRM traffic using the following command:

    New-NetFirewallRule -Name "Allow WinRM" -DisplayName "Allow WinRM" -Protocol TCP -LocalPort 5985 -Action Allow
    

    4.Listener Configuration: Verify that a WinRM listener is configured and listening on the appropriate ports. Run the following command to check the listener configuration:

    winrm enumerate winrm/config/listener
    

    5.Local Loopback Check: Since remote EMS connectivity works, but local EMS connectivity fails, it could be due to a local configuration issue. Verify that the local loopback address (127.0.0.1) is not blocked by any security software or firewall rules.

    Moreover, an issue similar to yours and its resolution is here for your reference.

    Issue link: WinRM error on Exchange 2019 - Microsoft Q&A

    Should you need more help on this, you can feel free to post back. 


    If the answer is helpful, please click on “Accept answer” as it could help other members of the Microsoft Q&A community who have similar questions and are looking for solutions.

    Thank you for your support and understanding.

    Best Wishes,

    Alex Zhang


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.