3

当我尝试连接到远程计算机上的 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...

我选择信任所有主机:

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

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

4

3 回答 3

2

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

于 2014-10-03T03:27:30.133 回答
0

我认为您必须遵循一些步骤,而不是这里有两个视频可能会有所帮助 enable-psremoting -force commandlet 至少对于我的情况不会解决问题,您必须遵循一些步骤才能成功连接到远程服务器,我将它们录制为 youtube 中的视频,在这种情况下,我尝试从另一台服务器远程连接到 Web 服务器核心

http://www.youtube.com/watch?v=oGHC0sbe17Y http://www.youtube.com/watch?v=SpzAsRkjV40

最良好的问候

于 2014-04-30T17:49:24.517 回答
0

在我的情况下,修复是打开一个提升的 shell 并运行:

netsh winhttp reset proxy

注意:即使netsh winhttp show proxy显示我的机器配置为“直接访问(无代理服务器)”,这仍然有效。不需要重新启动。

于 2020-10-20T01:28:51.077 回答