我有两台远程计算机:1我们将其称为驱动程序,2我们将其称为客户端。它们在同一个域中,我们称它们为“ TECH.com”。
在驱动程序计算机上,我有一个控制客户端计算机的PowerShell脚本:1,还原客户端上的检查点。2,停止客户端。3,启动客户端。等。我正在尝试做的是使客户端计算机执行另一个PowerShell脚本(可以驻留在客户端或驱动程序和/或驱动程序上。可以在必要时将文件从驱动程序复制到客户端)。客户端计算机。
因此我做了一些研究,发现了两种方法:1,WS管理。2,WMI我在两台机器上都启用了psremoting。我已经在两台机器上测试了WsMan,并且它们都工作正常,但是我已经能够在这两台机器之间传输文件。但是,当我尝试运行Invoke-command时,它给了我错误:
Connecting to remote server XXXXXXtech.com failed with the following error message : WinRM cannot process the request. The following
error with errorcode 0x80090311 occurred while using Kerberos authentication: There are currently no logon servers available to service the logon request.
Possible causes are:
-The user name or password specified are invalid.
-Kerberos is used when no authentication method and no user name are specified.
-Kerberos accepts domain user names, but not local user names.
-The Service Principal Name (SPN) for the remote computer name and port does not exist.
-The client and remote computers are in different domains and there is no trust between the two domains.
After checking for the above issues, try the following:
-Check the Event Viewer for events related to authentication.
-Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or use HTTPS transport.
Note that computers in the TrustedHosts list might not be authenticated.
-For more information about WinRM configuration, run the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (XXXXXX.XXXXtech.com:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : AuthenticationFailed,PSSessionStateBroken