Toll Free: +1 888 900 4529 |   Toll Free: +44 800 088 5522

The Connection to the Specified Remote Host was Refused

Mark Jonathan Smith | March 23rd, 2015 | general

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.

exchange-recovery-new

To initialize the connection, ISS uses the following services:

  • Web Services for Management (WAMan)
  • Windows Remote Management (WinRM)

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”.

This error “Connection to the Specified Remote Host was Refused” could be encountered owing to following reasons:

#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:

  1. Run WinRM Quick Config on Server and check if the test is passed or if any action is required to work around. If the result says that actions are required, click “Yes” when message is prompted to make configuration changes.
  2. Run winrm enumerate winrm/config/listener command and check out if a listener is available for HTTP protocol on port 5985 to respond to the addresses.
The following two tabs change content below.

Mark Jonathan Smith

Mark Jonathan Smith is a Tech. Blogger & he wrote posts on various topics related to Exchange Server & MS Outlook issues, conversion & migration. Mark is a MCITP certified & he continues focus on Active Directory, Exchange Server & Outlook.