4

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...

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
  • 1,309
  • 2
  • 22
  • 29
  • In your example, you are trying to connect to 54.228.XX.XX, but you only show that the remote computer is listening on 10.35.XXX.XXX and 127.0.0.1; I'm missing something here. Can you clarify what IP addresses are in use in the attempted connection? – jbsmith Aug 09 '13 at 17:23
  • @jbsmith This is taking place on an AWS instance, with 10.35.XXX.XXX being the private IP. – Jonathan Aug 10 '13 at 11:04
  • @Jonathan What happens if you run 'WinRM Quickconfig' on both machines? Also, [this article](http://msdn.microsoft.com/en-us/library/windows/desktop/aa384372(v=vs.85).aspx) also says to setup port 5986 for https connections, however the quickconfig command should set you up easily. – dwolters Aug 13 '13 at 15:21

3 Answers3

1

I know this is an old thread, but I had the same issue and took me close to a full day to figure this out.

According to this reddit article, you have to update your firewall rules corresponding to "Windows Remote Management" to allow the connection (even if it is NOT SECURE)! As far as I can tell, that's the only way to make WinRM work in Server Manager since it uses HTTP, even in production environments!!

shadowfax
  • 11
  • 1
0

Have you checked Windows Firewall to make sure that the rule for Windows Remote Management (In) is enabled? My money is on that rule not being enabled.

Your config for WinRM looks fine so it's likely either a host-based firewall or a network firewall somewhere.

MDMarra
  • 100,734
  • 32
  • 197
  • 329
  • I've updated my question to say that I've allowed inbound connections on port 5985. Is there anything else I need to do? – Jonathan Aug 08 '13 at 15:09
0

If you are hosting servers on an AWS instance then you need to make sure a Security Group associated with your instances is configured to allow inbound TCP 5985 and 5986 traffic.

bCoder
  • 1