使用 PowerShell 遠端存取計算機

使用 PowerShell 遠端存取計算機

我嘗試透過 PowerShell 遠端存取計算機,但收到此錯誤:

WinRM client cannot process the request. If the authentication scheme is different from
Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be
used or the destination machine must be added to the TrustedHosts configuration setting. Use
winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not
be authenticated. You can get more information about that by running the following command:
winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ etsn <ip address here> -Credential '<username here>'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (<ip address here>:String) [Enter-PSSession], PSRemoti
   ngTransportException
    + FullyQualifiedErrorId : CreateRemoteRunspaceFailed

我嘗試將我的電腦新增至受信任的主機,但我不斷收到此錯誤。如何透過 PowerShell 遠端存取另一台電腦?

答案1

您可能需要在遠端電腦上執行 Enable-PSRemoting。另外,請確保遠端註冊表服務也在遠端電腦上執行。

相關內容