【问题标题】:Enter-PSSession not working, Firewall port 5985 is openEnter-PSSession 不工作,防火墙端口 5985 已打开
【发布时间】:2017-09-15 04:54:50
【问题描述】:

错误:

Enter-PSSession : Connecting to remote server sadcm0000081 failed with the following error 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. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ Enter-PSSession -ComputerName sadcm0000081
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (sadcm0000081:String) [Enter-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed

测试-WSN 输出:

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

【问题讨论】:

  • 可能是 DNS 吗? nslookup for sadcm0000081 工作吗?你能用IP试试吗?并验证是否 telnet sadcm0000081 5985 最重要的是是否在系统上启用了 PS 远程处理。

标签: powershell powershell-2.0 windows-server-2008 windows2012


【解决方案1】:

首先尝试使用管理员控制台运行 powershell Enable-PSRemoting。 之后注意远程管理的 Windows 防火墙规则。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-06-17
    • 1970-01-01
    • 2014-09-03
    • 1970-01-01
    • 2022-08-09
    • 2015-01-02
    • 1970-01-01
    • 2013-12-02
    相关资源
    最近更新 更多