Connecting to Remote Server Failed in Exchange Management Shell

By Ahmet Tolga KAYA 9 min read
Connecting to Remote Server Failed in Exchange Management Shell

Quick answer: Connecting to remote server failed in Exchange Management Shell means the local WinRM client could not open a remote PowerShell session to the Exchange PowerShell virtual directory in IIS. Match the exact error text first: HTTP 500 usually points to ExchangeInstallPath or the vdir path, a refused connection to WinRM or the app pool, and an invalid shell handle to the port 444 certificate.

Connecting to remote server failed is the error I least like to see on an Exchange server, because it takes away the one tool you need to fix everything else. You double-click Exchange Management Shell, it says Connecting to EX01…, then it prints a red WinRM message and asks you for a server FQDN. Typing another name rarely helps. The good news is that the message is not one problem but a small family of them, and the exact wording tells you where to look. Below is the order I work through it on Exchange Server 2016, 2019 and Exchange Server SE.

Connecting to remote server failed in Exchange Management Shell: how to fix it

What Connecting to Remote Server Failed Looks Like in Exchange

Exchange Management Shell is not a local snap-in. The shortcut runs a script that creates a remote PowerShell session to http://<server>/PowerShell on an Exchange server, using Kerberos. IIS receives the request in the Default Web Site, proxies it to the Exchange Back End site on port 444, and the MSExchangePowerShellAppPool application pool runs your cmdlets. When any link in that chain breaks, you get a variant of this:

New-PSSession : [ex01.contoso.local] Connecting to remote server ex01.contoso.local failed with the
following error message : The WinRM client received an HTTP server error status (500), but the remote
service did not include any other information about the cause of the failure.
    + FullyQualifiedErrorId : PSSessionOpenFailed
Failed to connect to an Exchange server in the current site.
Enter the server FQDN where you want to connect.:Code language: CSS (css)
Connecting to remote server failed with WinRM HTTP server error status 500 in Exchange Management Shell

When connecting to remote server failed appears, write down the full sentence after error message. That sentence, not the first line, is what decides the fix.

Why Does Exchange Management Shell Say Connecting to Remote Server Failed?

Microsoft documents each wording in a separate support article. This is the map I keep in my head, based on those articles:

Error text after “connecting to remote server failed”Most likely causeWhere to fix it
The WinRM client received an HTTP server error status (500)ExchangeInstallPath system variable missing or PowerShell vdir path changed; WinRM Event ID 10113 in the System logEnvironment variables, IIS vdir path (KB 2027063)
The connection to the specified remote host was refusedMSExchangePowerShellAppPool stopped, user not enabled for Remote PowerShell, or WinRM misconfiguredIIS app pool, Set-User, winrm quickconfig (KB 2027064)
It cannot determine the content type of the HTTP responseKerbauth loaded as managed or at site level, WSMan missing from globalModules, user not enabledIIS modules, applicationHost.config (KB 2028305)
The shell handle passed to the WSMan Shell function is not validMicrosoft Exchange self-signed certificate removed from the Exchange Back End binding on port 444New self-signed cert, IIS binding on 444 (KB 2779694)

If your text is not in this table, the older Microsoft article for Exchange 2010 lists nine variants and the Exchange Management Troubleshooter (EMTshooter). That tool targets Exchange 2010, so on current versions I only use it as a reference list of error strings.

How Do I Fix Connecting to Remote Server Failed in Exchange?

Run everything below in an elevated Windows PowerShell window on the Exchange server itself, not in Exchange Management Shell (which is the thing that is broken). I go in this order because the early checks take seconds and catch most cases.

Connecting to remote server failed fix flowchart: error text, services, Back End port 444 certificate, IIS checks

Step 1: Check WinRM and the PowerShell application pool

The WinRM service must be running, a listener must exist for HTTP on port 5985, and the Exchange PowerShell app pool must be started. Microsoft’s guidance for the refused variant also says to recycle the pool if it is running and then check the event logs:

Get-Service WinRM
winrm enumerate winrm/config/listener

Import-Module WebAdministration
Get-WebAppPoolState -Name MSExchangePowerShellAppPool
Restart-WebAppPool -Name MSExchangePowerShellAppPool

If the listener is missing, winrm quickconfig recreates it; accept the changes it proposes only after reading them. If MSExchangePowerShellAppPool refuses to stay started, look in the Application log for the reason before you touch anything else. One lesson I learned the hard way: after a cumulative update or security update that did not finish cleanly, a stopped app pool is often a symptom, and the real fix is in my guide on Exchange services not starting after a security update.

Step 2: Look for WinRM Event ID 10113 and fix ExchangeInstallPath

For the HTTP 500 variant, Microsoft lists a WinRM warning, Event ID 10113, saying the service cannot load %ExchangeInstallPath%Bin\Microsoft.Exchange.AuthorizationPlugin.dll. That happens when the ExchangeInstallPath system variable is missing or wrong. Check both:

Get-WinEvent -FilterHashtable @{LogName='System'; ProviderName='Microsoft-Windows-WinRM'; Id=10113} -MaxEvents 5 |
    Format-List TimeCreated, Message

[Environment]::GetEnvironmentVariable('ExchangeInstallPath', 'Machine')Code language: PHP (php)

The default value is C:\Program Files\Microsoft\Exchange Server\V15\ (note the trailing backslash). If Exchange is installed elsewhere, use your real path. You can set it through System Properties > Environment Variables as the KB describes, or with:

[Environment]::SetEnvironmentVariable('ExchangeInstallPath', 'C:\Program Files\Microsoft\Exchange Server\V15\', 'Machine')Code language: PHP (php)

A new system variable is only picked up by processes that start after the change, so restart WinRM and IIS (or the server) before you test. If Event ID 10113 keeps appearing with a correct variable, compare the physical path of the PowerShell virtual directory in IIS Manager with a healthy Exchange server of the same version; the KB names a changed vdir path as the second cause.

Step 3: Check the Exchange Back End certificate on port 444

In my experience this step explains more connecting to remote server failed cases after maintenance windows than any other.

This is the one that catches people after a certificate clean-up. Setup binds a self-signed certificate named Microsoft Exchange to the Exchange Back End site on port 444. If someone deletes it because it looks like an old self-signed certificate, the front end can no longer proxy to the back end, and Exchange Management Shell not connecting is one of the results (OWA and ECP usually show blank pages too). Check the binding without Exchange cmdlets:

netsh http show sslcert ipport=0.0.0.0:444

Get-ChildItem Cert:\LocalMachine\My |
    Select-Object FriendlyName, Subject, NotAfter, ThumbprintCode language: JavaScript (javascript)

If the hash shown for 0.0.0.0:444 does not match a certificate in the store, or the binding is missing, Microsoft’s fix is to create a new self-signed certificate with New-ExchangeCertificate (answer No if it asks to overwrite the default SMTP certificate), then in IIS Manager open Exchange Back End > Bindings, edit the https binding on port 444, select the Microsoft Exchange certificate and run IISReset. If the old Microsoft Exchange certificate is still in the store, simply re-selecting it in the 444 binding is enough. Running New-ExchangeCertificate needs a working shell, so do it from another Exchange server in the organization if this one cannot connect. If your OAuth certificate is the one that expired, that is a different problem, covered in Exchange Auth Certificate expired.

Step 4: Check Kerbauth and the WSMan module in IIS

For the content type variant, Microsoft says Kerbauth must be a native module enabled only on the PowerShell virtual directory, pointing to V15\Bin\kerbauth.dll, and not loaded on the Default Web Site. WSMan must be registered in the globalModules section of applicationHost.config. A quick read-only check:

Select-String -Path "$env:windir\System32\inetsrv\config\applicationHost.config" -Pattern 'kerbauth|wsmsvc'Code language: JavaScript (javascript)

You should see <add name="WSMan" image="C:\Windows\system32\wsmsvc.dll" /> under globalModules. Back up applicationHost.config before editing it, and note the KB warning that removing the WinRM IIS Extension feature does not clean this file up for you.

Step 5: Confirm your account is enabled for Remote PowerShell

Both the refused and content type articles also list a user who is not enabled for Remote PowerShell. From a working shell (another admin or another server):

(Get-User -Identity 'contoso\admin.jdoe').RemotePowerShellEnabled
Set-User -Identity 'contoso\admin.jdoe' -RemotePowerShellEnabled $trueCode language: JavaScript (javascript)

If you ever run a downloaded troubleshooting script and PowerShell blocks it, see my note on running scripts is disabled on this system instead of setting Unrestricted.

How to Verify Connecting to Remote Server Failed Is Fixed

After the change, run iisreset /noforce, close every Exchange Management Shell window and open a new one. A healthy shell connects without asking for an FQDN, and a basic cmdlet returns data:

Get-ExchangeServer | Format-Table Name, AdminDisplayVersion
Get-WebAppPoolState -Name MSExchangePowerShellAppPool
Connecting to remote server failed fixed: port 444 certificate bound, app pool started, Exchange Management Shell connected

If the shell connects but connecting to remote server failed comes back after a reboot, something is undoing your change: a configuration management baseline, a certificate clean-up script, or a pending setup. That is the time to look at change history rather than IIS.

How to Prevent Connecting to Remote Server Failed Next Time

  • Never delete the Microsoft Exchange self-signed certificate during certificate housekeeping; it is used by the Back End site even when your public certificate is fine.
  • Do not move or rename Exchange virtual directories by hand in IIS Manager.
  • Keep at least two admin accounts enabled for Remote PowerShell, so a single Set-User mistake cannot lock you out.
  • After every CU or SU, open Exchange Management Shell once before you close the change window.

I keep this Exchange Management Shell November 2026 checklist next to my patching notes, because the same chain (WinRM, IIS, port 444, app pool) is behind most of the management errors I see after updates. Work the table from top to bottom and connecting to remote server failed is usually a ten-minute fix instead of a rebuild.

Connecting to Remote Server Failed: FAQ

What does connecting to remote server failed mean in Exchange Management Shell?

It means the WinRM client could not open a remote PowerShell session to the PowerShell virtual directory on the Exchange server. The text after the message (HTTP 500, refused, content type, invalid shell handle) tells you which component failed.

How do I fix the WinRM HTTP 500 error when Exchange Management Shell starts?

Check the System log for WinRM Event ID 10113, make sure the ExchangeInstallPath system variable points to the Exchange install folder, confirm the PowerShell virtual directory path was not changed, then restart WinRM and IIS.

Can a missing certificate cause connecting to remote server failed?

Yes. If the Microsoft Exchange self-signed certificate is removed from the Exchange Back End binding on port 444, the shell fails with an invalid shell handle error. Create or reselect the certificate on the 444 binding and run IISReset.

Is it safe to restart MSExchangePowerShellAppPool?

Recycling the PowerShell application pool only affects remote PowerShell sessions such as Exchange Management Shell; it does not stop mail flow. Microsoft lists recycling it as a first step for the refused connection variant.

Why is Exchange Management Shell not connecting for only one admin account?

That account is probably not enabled for Remote PowerShell. From a working session run (Get-User name).RemotePowerShellEnabled, and if it returns False, enable it with Set-User -RemotePowerShellEnabled $true.

References

Microsoft Learn: HTTP server error status (500) when you start EMS or EMC (KB 2027063)

Microsoft Learn: The connection to the specified remote host was refused (KB 2027064)

Microsoft Learn: The WinRM client cannot determine the content type of the HTTP response (KB 2028305)

Microsoft Learn: Unable to open OWA, ECP, or EMS after the self-signed certificate is removed (KB 2779694)

Microsoft Learn: Connecting to the remote server failed error messages and EMTshooter (Exchange 2010)

Ahmet Tolga KAYA

Systems Engineer and Technical Writer focused on Windows, Microsoft technologies, infrastructure, cybersecurity, automation, and platform reliability.