Tuesday, 3 March 2015

PowerShell remoting error "The WinRM client cannot process the request because the server name cannot be resolved."

We've been doing a lot of work with PowerShell and got stuck on a problem attempting to connect to a remote PowerShell machine (for example using Enter-PSSession) with the following error.

Connecting to remote server servername failed with the
following error message : The WinRM client cannot process the request because the server name cannot be resolved.

This was very strange as the computer name could be resolved and we could connect using

telnet servername 5985

It turns out that WinRM is using system proxy settings which were unfortunately set to invalid values from back when we were testing documenting system proxy settings for our Windows server agent.

You can check your system proxy settings using the following command

netsh winhttp show proxy

As you can see from the screenshot are the invalid values we'd been testing with. Ops.







1 comment:

  1. Don't forget if you want to clear the proxy use the reset command rather than setting the proxy to a blank value!

    netsh winhttp reset proxy

    ReplyDelete