首页/系统/Windows 运维速查/TrustedHosts:工作组场景远程
本包目录(413 条)

TrustedHosts:工作组场景远程

非域机器之间 PSRemoting 需要把对端加入 TrustedHosts(或改用证书/HTTPS):这是认证信任的妥协方案。

Windows 运维速查系统更新于 2026-10-12
用途工作组机器间建立 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\TrustedHosts
TrustedHosts 允许 NTLM 凭据发送:只加必要主机,不要图省事写 *,更稳妥用 HTTPS + 证书。

易错点

  • 写 * 等于信任任何主机,安全审计会直接扣分
  • TrustedHosts 只在客户端侧生效(发起方配置)

数据来源与参考

  • Microsoft Learn:TrustedHosts
  • Microsoft Learn:工作组 PSRemoting

相关工具

​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌