3

This is what happens when I try and connect to Powershell on my remote machine:

PS C:\Users\Jonathan> Test-WSMan -ComputerName 54.228.XX.XX
Test-WSMan : The WinRM client cannot complete the operation within the time specified. Check if the machine name is val
id and is reachable over the network and firewall exception for Windows Remote Management service is enabled.
At line:1 char:11
+ Test-WSMan <<<<  -ComputerName 54.228.XX.XX
    + CategoryInfo          : InvalidOperation: (54.228.XX.XX:String) [Test-WSMan], InvalidOperationException
    + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.TestWSManCommand

On my remote computer, I've confirmed that WinRM is running:

PS C:\Users\Administrator> net start winrm

The Windows Remote Management (WS-Management) service is starting.
The Windows Remote Management (WS-Management) service was started successfully.

I've confirmed that it is listening:

PS C:\Users\Administrator> winrm e winrm/config/listener

Listener
    Address = *
    Transport = HTTP
    Port = 5985
    Hostname
    Enabled = true
    URLPrefix = wsman
    CertificateThumbprint
    ListeningOn = 10.35.XXX.XXX, 127.0.0.1...

and I've chosen to trust all hosts:

PS C:\Users\Administrator> Set-Item WSMan:\localhost\Client\TrustedHosts -Value "*" -Force

and finally, I've allowed inbound connections on port 5985. Have I missed something?!

Jonathan
  • 13,947
  • 17
  • 94
  • 123
  • Try `Enable-PSRemoting` on both machines. – Anthony Neace Aug 08 '13 at 17:31
  • 1
    `-ComputerName 54.228.XX.XX` vs. `ListeningOn = 10.35.XXX.XXX`? – Ansgar Wiechers Aug 08 '13 at 18:27
  • Did you solve this problem? We've been tearing our hair out over basically the same problem. Firewall turned off. Everything set up as per the hundreds of posts on setting up winrm. We can telnet to the service on localhost, but not via the ip address, from the same server. Windows 2012. Can not imagine what is stopping the connections via the ip address, but working fine on localhost. – Action Dan Sep 05 '14 at 04:28
  • @ActionDan Unfortunately not, I think I gave up in the end. – Jonathan Sep 05 '14 at 11:54
  • @Jonathan thanks for the update, we are doing the same. – Action Dan Sep 08 '14 at 00:56

2 Answers2

2

The unfortunate solution for us, was to start from scratch and reinstall windows. After spending a week wasting our time, that fixed it.

Action Dan
  • 443
  • 4
  • 10
0

The fix in my case was to open an elevated shell and run:

netsh winhttp reset proxy

Note: this worked even though netsh winhttp show proxy showed that my machine was configured for "Direct access (no proxy server)." No reboot was required.

stw801
  • 1