【发布时间】:2018-01-12 02:59:01
【问题描述】:
我正在尝试在远程服务器上执行以下语句:
Invoke-Command -ComputerName server1 -ScriptBlock {Get-Process}
但我收到一条错误消息:
[server1] Connecting to remote server failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the serv
ice on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS
or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". For more
information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (:) [], PSRemotingTransportException
+ FullyQualifiedErrorId : PSSessionStateBroken
这是什么原因以及如何解决?
【问题讨论】:
-
尝试在远程计算机中输入 Enable-PSRemoting。
标签: windows powershell powershell-2.0