How to fix Exchange Connectivity failing in HC due to proxy settings?

Question: How to fix Exchange Connectivity failing in HC due to proxy settings?

Problem statement:
HC communication with exchange server using remote PowerShell was unsuccessful.
Manual connectivity with Exchange Server using PS script and Windows PowerShell interface on HC Portal was unsuccessful.

Error message: 
Connecting to remote server IPaddress failed with the following error message : The connection to the specified remote host was refused. Verify that the WS-Management service is running on the remote host and configured to listen for requests on the correct port and HTTP URL. For more information, see the about_Remote_Troubleshooting Help topic.

Error Reaseon:
This issue can occur due to several reasons:
    WS-Management Service Issue: The WS-Management (WinRM) service on the remote server may not be running or may not be configured to listen for requests on the correct port or HTTP URL.
    Firewall/Network Configuration: Network issues, such as firewalls blocking the required ports or network configuration errors, can prevent successful connection to the remote server.
    Proxy Configuration: Incorrect proxy settings on the client machine can interfere with the connection to the remote server.

Solution:
The issue was resolved by running the following command from command prompt.
    netsh winhttp reset proxy
The command netsh winhttp reset proxy is used to reset the WinHTTP proxy settings to their default state. By running this command, you essentially clear any proxy settings that might be interfering with the connection.