使用 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。此外,请确保远程注册表服务也在远程计算机上运行。

相关内容