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.







Comments

  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

Post a Comment

Popular posts from this blog

Windows Server 2016, 2019, 2022, Windows 10 and Windows 11: Date and time "Some settings are managed by your organization".

TFTPD32 or TFTPD64 reports Bind error 10013 An attempt was made to access a socket in a way forbidden by its access permissions.

Windows Server 2019 desktop icons such as My Computer, Windows cannot access the specified device, path, or file.