WinRM的聆听者并不全是耳朵

这是当我尝试连接到我的远程机器上的Powershell时发生的情况:

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 

在我的远程计算机上,我已经确认WinRM正在运行:

 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. 

我已经确认它正在听:

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

我select了信任所有主机:

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

最后,我允许5985端口的入站连接。我错过了什么?

我知道这是一个古老的线索,但我有同样的问题,并花了我近一整天的时间来解决这个问题。

根据这篇reddit文章 ,你必须更新与“Windows远程pipe理”相对应的防火墙规则以允许连接(即使它不安全)! 据我所知,这是使WinRM在服务器pipe理器中工作的唯一方法,因为它使用HTTP,即使在生产环境中!

您是否检查过Windows防火墙,以确保启用了Windows远程pipe理(In)的规则? 我的钱是在这个规则没有启用。

你的configurationWinRM看起来很好,所以它可能是一个基于主机的防火墙或networking防火墙的地方。

如果您在AWS实例上托pipe服务器,则需要确保与您的实例关联的安全组configuration为允许入站TCP 5985和5986通信。