使用powershell获取GPO设置



在一台windows 8机器上,我想阅读GPO设置"Accounts:Block Microsoft Accounts",可以通过以下操作手动配置:

Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options -> "Accounts: Block Microsoft accounts"

但是,我想使用powershell脚本读取设置

我试过的两个选项:

  1. 使用Get-GPOReport生成HTML报告:本地策略不会出现
  2. 使用gpresult/r:对于本地组策略,它表示以下GPO未应用,因为它们已被过滤掉

有人能指导我该怎么做吗。我是powershell的新手!

谢谢。

首先,需要使用Get-GPOReport cmdlet生成GPO报告,然后解析XML或HTML报告以获取所需的参数。

最新更新