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防火牆規則。