我有两台运行Windows XP SP3的PC,分别称为PC1和PC2。 它们通过交叉以太网电缆相互连接。 PC1的静态IP地址为10.0.0.1,PC2的静态IP地址为10.0.0.2。 我想从PC1调用PC2上的命令行可执行文件。 我做了一些研究,似乎Windows Powershell调用命令将允许我这样做。 我以pipe理员组的成员身份login,并以pipe理员身份运行Windows Powershell控制台。
该命令失败:
PS C:\Documents and Settings\Administrator> invoke-command -computername 10.0.0.2 -scriptblock { hostname }
有以下错误:
[10.0.0.2] Connecting to remote server failed with the following error message : The 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 winr m.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_Rem ote_Troubleshooting Help topic. + CategoryInfo : OpenError: (:) [], PSRemotingTransportException + FullyQualifiedErrorId : PSSessionStateBroken
当我尝试运行这个命令时:
winrm quickconfig
我也得到一个错误:
WSManFault Message = Access is denied Error number: -2147024891 0x80070005 Access is denied
我阅读启用Powershell远程,访问被拒绝? 并意识到我没有连接到域。
我是否需要连接到域以通过Windows Powershell发出远程命令?
是否有另一种更简单的方法来从PC1远程执行PC2上的应用程序?
外行的PowerShell远程指南在工作组中有一个关于远程处理的部分。 它应该得到你所需要的。
还有PowerShell远程处理的pipe理员指南