用 gpresult /r 查看生效的组策略

列出用户和计算机实际应用的 GPO、安全组及策略来源——排查“策略没生效”的第一站。

Windows管理安全组策略低风险
运行 `gpresult /r` 查看用户和计算机应用的 GPO,或用 `gpresult /h report.html` 生成完整的 HTML 报告。

01命令

命令
$ gpresult /r

02作用说明

gpresult 执行 RSoP(策略结果集)查询:它会显示哪些 GPO 已应用、哪些被过滤掉,以及你的账户属于哪些安全组——经常能发现策略被过滤是因为机器不在正确的 OU 里。`/r` 是快速摘要;`/h report.html` 会生成包含注册表级设置的详细 HTML 报告。计算机范围的查询需要管理员权限,如果输出看起来不全,先开一个提权窗口。

03风险

风险低风险
使用条件For computer-scope results run from an elevated prompt; add /scope computer or /scope user to limit output.

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • gpresult | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    依据: Microsoft documents gpresult /r to display RSoP summary information for user and computer scope, and /h to save an HTML report.
  • GPRESULT - Windows CMD
    SS64 · technical · 2026-09-17
    依据: SS64 explains gpresult /r output showing applied GPOs, security groups, and the /h switch for a full HTML report.

最后验证: 2026-09-17 · 分类: 安全与隐私

06相关方案