【问题标题】:WinRM client cannot complete the operation within the time specifiedWinRM 客户端无法在指定时间内完成操作
【发布时间】:2020-10-20 09:28:51
【问题描述】:

当我尝试在远程计算机上连接到 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 上的入站连接。我错过了什么吗?!

【问题讨论】:

  • 在两台机器上尝试Enable-PSRemoting。
  • -ComputerName 54.228.XX.XX 与 ListeningOn = 10.35.XXX.XXX?
  • 这个问题你解决了吗?我们一直在为基本相同的问题而烦恼。防火墙关闭。一切都按照关于设置 winrm 的数百个帖子进行设置。我们可以从同一台服务器远程登录到本地主机上的服务,但不能通过 IP 地址。 Windows 2012。无法想象是什么阻止了通过 IP 地址的连接,但在 localhost 上工作正常。
  • @ActionDan 很遗憾没有,我想我最终放弃了。
  • @Jonathan 感谢更新,我们也在做同样的事情。

标签: powershell winrm wsman


【解决方案1】:

对我们来说不幸的解决方案是从头开始并重新安装 Windows。在浪费了一个星期的时间之后,这解决了它。

【讨论】:

    【解决方案2】:

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

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

    最好的问候

    【讨论】:

      【解决方案3】:

      在我的情况下,解决方法是打开一个提升的 shell 并运行:

      netsh winhttp reset proxy

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

      【讨论】:

        猜你喜欢
        • 2017-11-01
        • 2020-01-17
        • 1970-01-01
        • 2023-01-14
        • 1970-01-01
        • 2022-11-03
        • 2022-11-26
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多