In this segment, we are going to discuss error message “The Connection to the Specified Remote Host was Refused” that generally occurs when starting Exchange Management Console or Exchange Management Shell.
In Exchange 2010, the management job is performed by the Remote PowerShell, also when the Management Tools are opened. Earlier in Exchange 2007, this service has less dependency upon IIS but with Exchange 2010 this dependency is much higher as the Remote PowerShell requests are processed HTTP protocol that uses IIs mechanism.
Whenever Exchange Management Shell is opened, a PowerShell session gets started. In Exchange 2010, it does not simply loads the snap-in but the PowerShell utilizes the WinRM services to connect to the nearest Internet Information Service (IIS). The Windows Remote Manager then authenticates the remote session owing to which the cmdlets can be used to perform Exchange management tasks.
Discussion: Although the process of connecting to the IIS service works well but in some cases it may result in errors, restricting access to the management tools. One of the error message is: “The connection to the specified remote host was refused”.
#1: Check out if the MSExchangePowerShellAppPool is running and test if there are any errors in the event log.
#2: Verify that the user trying to establish a connection is Remote PowerShell enabled. To check this, run the query “(Get-User <username>).RemotePowershellEnabled” and determine what result it returns: True or False.
If the result is False and the user has to be enabled to avail Remote PowerShell services, click “Set-User <username> -RemotePowerShellEnabled $True”
#3: Check out if the WinRM service is configured accurately on the Server. For this, you can follow the steps mentioned below: