当前位置: 首页 > 知识库问答 >
问题:

WinRM连接问题?

戚澄邈
2023-03-14

我正试图在公司网络中使用公司服务器进行登录。我可以RDC到服务器,ping服务器,还可以使用get Service-ComputerName DBServer获取Windows服务状态。但是,WinRM会话不允许我进入服务器。

我的电脑:

  • Windows 10

服务器:

  • Windows Server 2012

在DBServer上:

PS C:\Windows\system32> winrm e winrm/config/listerner
WSManFault
    Message
        ProviderFault
            WSManFault
                Message = The WS-Management service cannot process the
                          request. The resource URI does not support the
                          Enumerate operation.

Error number:  -2144108495 0x80338031
The WS-Management service cannot process the request because the WS-
Addressing Action URI in the request is not compatible with the resource.

PS C:\Windows\system32> winrm quickconfig
WinRM service is already running on this machine.
WinRM is already set up for remote management on this computer.

PS C:\Windows\system32> winrm get winrm/config
Config
    MaxEnvelopeSizekb = 500
    MaxTimeoutms = 60000
    MaxBatchItems = 32000
    MaxProviderRequests = 4294967295
    Client
        NetworkDelayms = 5000
        URLPrefix = wsman
        AllowUnencrypted = false
        Auth
            Basic = true
            Digest = true
            Kerberos = true
            Negotiate = true
            Certificate = true
            CredSSP = false
        DefaultPorts
            HTTP = 5985
            HTTPS = 5986
        TrustedHosts
    Service
        RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)
        MaxConcurrentOperations = 4294967295
        MaxConcurrentOperationsPerUser = 1500
        EnumerationTimeoutms = 240000
        MaxConnections = 300
        MaxPacketRetrievalTimeSeconds = 120
        AllowUnencrypted = false
        Auth
            Basic = false
            Kerberos = true
            Negotiate = true
            Certificate = false
            CredSSP = false
            CbtHardeningLevel = Relaxed
        DefaultPorts
            HTTP = 5985
            HTTPS = 5986
        IPv4Filter = *
        IPv6Filter = *
        EnableCompatibilityHttpListener = false
        EnableCompatibilityHttpsListener = false
        CertificateThumbprint
        AllowRemoteAccess = true
    Winrs
        AllowRemoteShellAccess = true
        IdleTimeout = 7200000
        MaxConcurrentUsers = 10
        MaxShellRunTime = 2147483647
        MaxProcessesPerShell = 25
        MaxMemoryPerShellMB = 1024
        MaxShellsPerUser = 30

在客户端(我的机器):

PS C:\windows\system32> Test-WSMan -ComputerName "DBServer"
Test-WSMan : <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/
1/wsmanfault" Code="2150859046" Machine="MyMachine"><f:Message>WinRM cannot
complete the operation. Verify that the specified computer name is valid, that
the computer is accessible over the network, and that a firewall exception for
the WinRM service is enabled and allows access from this computer. By default,
the WinRM firewall exception for public profiles limits access to remote
computers within the same local subnet. </f:Message></f:WSManFault>
At line:1 char:1
+ Test-WSMan -ComputerName "DBServer"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (DBServer:String) [Test-WSMan], InvalidOperationException
    + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.TestWSManCommand

PS C:\windows\system32> winrm e winrm/config/listener
Listener
    Address = *
    Transport = HTTP
    Port = 5985
    Hostname
    Enabled = true
    URLPrefix = wsman
    CertificateThumbprint
    ListeningOn = 127.0.0.1, 128.1.60.202, ::1

PS C:\windows\system32> winrm quickconfig
WinRM service is already running on this machine.
WinRM is already set up for remote management on this computer.

WinRM的防火墙端口对HTTP和HTTPS都是开放的。

有人能帮助解决这个问题吗?

共有1个答案

文凯康
2023-03-14

注意:以下可能不是您问题的根本原因,但它解释了您在服务器上看到的错误消息,这是神秘的,值得解释(一个简单的打字错误也让我困惑并将我带到这里)。

您在服务器上传递给winrm e的资源URI中有一个输入错误:

winrm e winrm/config/listerner  # note the extra "r"

应该是:

winrm e winrm/config/listener

不幸的是,**对不存在的资源URI的引用会导致以下隐藏的错误消息:

WSManFault
    Message
        ProviderFault
            WSManFault
                Message = The WS-Management service cannot process the request. The resource URI does not support the Enumerate operation.

Error number:  -2144108495 0x80338031
The WS-Management service cannot process the request because the WS-Addressing Action URI in the request is not compatible with the resource.
 类似资料:
  • 当我试图将我的一台机器用作WinRM客户端以连接到另一台机器时,我的一台机器出现问题。场景是: Window 7上的问题机器(VM A)已经启用了WinRM(已经运行winrm快速配置,Enable-PSRemoting),然后我将远程机器(VM C)的IP添加到VM A的受信任主机中,然后运行Test-WSMan,我得到这个错误Test-WSMan: 客户端无法连接到请求中指定的目标。验证目标上

  • 问题内容: 如果我在闲置了一段时间后启动应用程序,那么我曾经遇到以下错误。(我正在使用Spring + Hibernate + MySQL作为DB) 我通过将以下内容添加到我的servlet-context.xml中解决了这个问题。 我在这里问了这个问题,这个问题是解决方案所特有的。我需要知道为什么会遇到这个错误。 我尝试了上面链接中提供的第一个选项(使用autoReconnect = true配

  • 在连接jstatd和visualvm时遇到了一些问题。以下是我设置的详细信息: 杰斯塔德。政策 叫做与 牵引端口 港口又好又开放 正在运行的应用程序是在vmware上运行的,尽管可以毫无问题地访问该应用程序。 如果有人对连接visualvm有任何想法,那就太好了。

  • 我在CentOS7(confluent)上安装了Apache Kafka,正试图以分布式模式运行filestream Kafka connect,但收到以下错误: 现在可以通过更新workers.properties(如http://docs.confluent.io/current/connect/userguide.html#connect-userguide-distributed-conf

  • 我创建了一个测试帐户来开始使用BrowserStack。我关注了以下页面:在Browserstack Automate上运行量角器测试,这真的很有帮助。 现在我得到: 这是什么意思?我没有任何请求。我只是打开一个页面,点击一个元素,就这样了。