0

I need to get WinRM working for three Windows Server 2008 R2 (SP1) machines. They are running Microsoft Exchange on them. I run Windows Powershell as an Administrator and type "winrm qc", the following is then printed

PS C:\Windows\system32> winrm qc
WinRM already is set up to receive requests on this machine.
WSManFault
    Message = The WinRM client sent a request to an HTTP server and got a response saying the requested HTTP URL was not
 available. This is usually returned by a HTTP server that does not support the WS-Management protocol.

Error number:  -2144108269 0x80338113
The WinRM client sent a request to an HTTP server and got a response saying the requested HTTP URL was not available. Th
is is usually returned by a HTTP server that does not support the WS-Management protocol.

The same error message is printed when I stop and then start the WinRM service.

The http iplist is empty and if I add 127.0.0.1 to it the same error message is printed when running winrm qc.

PS C:\Windows\system32> netsh http show iplist

IP addresses present in the IP listen list:
-------------------------------------------

IPv6 is disabled on the network cards. Windows Remote Managemnt (HTTP-in) rule is enabled in the firewall. Any thoughts? Thanks!

Edit: even if I run "winrm id" i get the same error message. Seems like it is completely broken on these three servers?

Adam
  • 1
  • 2

1 Answers1

1

uncomment the line " 127.0.0.1 localhost " in C:\Windows\System32\drivers\etc\hosts file, then it works

user441408
  • 11
  • 1
  • When I read this comment I thought, "That's stupid, why would that matter, and we would never remove that line from our hosts file". But, someone had changed that file. We had 4 spaces instead of a tab between the IP and the word localhost. Changing back to the tab fixed the problem. – rlamoni May 19 '20 at 22:57