0

错误:输入-PSSession将不能正常工作,防火墙端口5985是开放

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 
+0

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

回答

0

首先尝试在运行PowerShell的启用,PSRemoting使用管理员控制台。 之后,看看远程管理的Windows防火墙规则。