我想更遠的服務器上執行以下語句:PowerShell:錯誤執行命令使用Invoke-Command?
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。 –