5

我一直在努力处理 winrm 和 TrustedHosts 但无济于事。经过一些试验,我发现 winrm/config/client 的这个字段最多只能有 1023 个符号,这还不够,特别是如果通过它们的 ipv6 添加主机。我引用了 Windows 远程管理的安装和配置A trusted hosts list should be set up when mutual authentication cannot be established.

同样在同一个文件中,文本说:Other computers in a workgroup or computers in a different domain should be added to this list.所以我认为这意味着只要两台计算机在同一个域中,我应该能够使用 winrm 从另一台访问其中一台。

我尝试将两台计算机添加到测试域并执行:

winrm 获取 winrm/config/client -r:192.168.100.1 -u:user -p:pass

从其中一个到另一个,但这失败并出现错误:

WSManFault
    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 ad
ded to the TrustedHosts configuration setting. Use winrm.cmd to configure Truste
dHosts. You can get more information about that by running the following command
: winrm help config.

Error number:  -2144108316 0x803380E4
The WinRM client cannot process the request. If the authentication scheme is dif
ferent 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 Tru
stedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. You ca
n get more information about that by running the following command: winrm help c
onfig.

将 192.168.100.1 添加到 TrustedHosts 后,上述查询成功。所以我的问题是:是否可以在不修改 TrustedHosts 的情况下在两台主机之间使用 winrm?将受信任的主机设置*为对我来说不是一个选项。

4

1 回答 1

10

如果两台机器在同一个域中,您应该能够使用 ComputerName 而不是 IP 地址。当您使用 IP 地址时,您几乎被迫使用我所看到的 TrustedHosts。

于 2012-10-16T15:45:15.933 回答