Skip to content

Instantly share code, notes, and snippets.

@isarns
Created April 13, 2021 10:04
Show Gist options
  • Save isarns/300fed9613f11e50661026a80cd44063 to your computer and use it in GitHub Desktop.
Save isarns/300fed9613f11e50661026a80cd44063 to your computer and use it in GitHub Desktop.
Get-GPO -All | ? {
$report = Get-GPOReport -Guid $_.id -ReportType XML
$report.Contains("<q1:Name>**first Policie Name**</q1:Name>
<q1:Units />
<q1:displayboolean>**false/true**</q1:displayboolean>")` #false for disable ... true for enable
-or
$report.Contains("<q1:Name>**second Policie Name**</q1:Name>
<q1:Units />
<q1:displayboolean>**false/true**</q1:displayboolean>") #false for disable ... true for enable
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment