Created
August 8, 2016 18:32
-
-
Save jacksoneyton/cf42402e5bbe4e122e48fb68eada64bb to your computer and use it in GitHub Desktop.
Gets windows update settings as listed in GPO policies.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#reqiures -Modules GroupPolicy | |
foreach ($gpo in (Get-GPO -All)) { | |
$xml = [Xml](Get-GPOReport -Guid $gpo.Id -ReportType Xml) | |
if (($xml.GPO.SelectNodes("//*[local-name() = 'Name']")."#text" | Where-Object { $_ -eq "Configure Automatic Updates" }).Count -gt 0) { | |
Write-Output -InputObject "The following GPO is configuring Windows Update Settings: '$($xml.GPO.Name)'." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment