在powershell中测试WSMan

时间:2013-07-08 08:51:48

标签: powershell wsman

我正在尝试使用PowerShell从客户端计算机备份我的服务器。

我正在尝试执行我的服务器上的批处理文件,但我无法与我的服务器建立连接。我搜索了很多并尝试了

Test-WSMan : The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or i
f the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be a
dded to the TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the Tru
stedHosts list might not be authenticated. You can get more information about that by running the following command: wi
nrm help config.
At line:1 char:11
+ Test-WsMan <<<<  182.50.121.100 -credential $cred -authentication default
    + CategoryInfo          : InvalidOperation: (182.50.121.100:String) [Test-WSMan], InvalidOperationException
    + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.TestWSManCommand

任何人都可以告诉我如何逐步执行bat文件

1 个答案:

答案 0 :(得分:2)

您是否在“GPEDIT”即组策略中添加了主机名或IP并启用了新凭据?

如果您遗漏了某些内容,请按照此步骤操作。

http://www.ifunky.net/Blog/post/How-To-Enable-PowerShell-Remoting-(WinRM).aspx

http://blog.crayon.no/blogs/janegil/archive/2010/03/04/enable_2D00_and_2D00_configure_2D00_windows_2D00_powershell_2D00_remoting_2D00_using_2D00_group_2D00_policy.aspx

他们有足够的信息可以开始使用。有时,如果一切都已启用,最好重新启动远程管理服务。