| 用途 | 工作组机器间建立 WinRM 信任 |
|---|---|
| 查看 | Get-Item WSMan:\localhost\Client\TrustedHosts |
| 设置 | Set-Item WSMan:\localhost\Client\TrustedHosts -Value "192.168.1.10" -Force;可加 * 通配 |
常用示例
常用示例
Get-Item WSMan:\localhost\Client\TrustedHosts
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "server01,192.168.1.10" -Concatenate -Force
# 清空
Clear-Item WSMan:\localhost\Client\TrustedHostsTrustedHosts 允许 NTLM 凭据发送:只加必要主机,不要图省事写 *,更稳妥用 HTTPS + 证书。