我不太清楚我的问题是什么,但我认为我已经正确设置了所有内容。我正在尝试使用 HTTP(未加密)对启用了 HyperV 的 Windows 10 计算机进行简单的基本身份验证来测试 WinRM。此 HyperV 服务器只是位于我家实验室的一个系统。我的设置中没有域控制器/活动目录。
我按照在线教程 1) 在服务和客户端上启用基本身份验证,2) 将允许未加密设置为 true 和 3) 设置受信任的主机。
以下是我在 192.168.98.* 子网的服务器端的配置。
PS WSMan:\localhost\Client> winrm get winrm/config/service/auth
Auth
Basic = true
Kerberos = true
Negotiate = true
Certificate = false
CredSSP = false
CbtHardeningLevel = Relaxed
PS WSMan:\localhost\Client> winrm get winrm/config/client
Client
NetworkDelayms = 5000
URLPrefix = wsman
AllowUnencrypted = true
Auth
Basic = true
Digest = true
Kerberos = true
Negotiate = true
Certificate = true
CredSSP = false
DefaultPorts
HTTP = 5985
HTTPS = 5986
TrustedHosts = 192.168.98.86,192.168.20.*
我验证了 5985 上的监听器已经启用。
但是,当我尝试从位于 192.168.20.* 子网的客户端执行示例命令时,得到了以下结果:
PS C:\Users\dchu> winrm identify -r:http://192.168.98.86:5985 -auth:basic -u:beyonddc -p:fooPassword -encoding:utf-8
WSManFault
Message = The WinRM client cannot process the request. Unencrypted traffic is currently disabled in the client configuration. Change the client configuration and try the request again.
Error number: -2144108322 0x803380DE
The WinRM client cannot process the request. Unencrypted traffic is currently disabled in the client configuration. Change the client configuration and try the request again.
PS C:\Users\dchu>
如果有人能给我一些启发,我将不胜感激。谢谢!