megZo
megZo

Reputation: 704

Get a GPO setting using powershell

on a windows 8 machine, I want to read the GPO setting "Accounts: Block Microsoft accounts" which can manually be configured by going here :

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

However i want to read the setting using a powershell script

The two options I tried:

  1. Generate the HTML report using Get-GPOReport : the local policies dont come up.
  2. Using gpresult /r : for local group policy it says The following GPOs were not applied because they were filtered out.

can anyone guide me as to how I should proceed. I am extremely new to powershell!

Thanks.

Upvotes: 0

Views: 2033

Answers (1)

Kostia
Kostia

Reputation: 51

First, you need to generate the GPO report using the Get-GPOReport cmdlet and then parse the XML or HTML report to get the parameter that you need.

Upvotes: 1

Related Questions