Jeff Wouters's Blog

PowerShell – Find disabled Group Policy Objects

by on Aug.15, 2013, under Active Directory, DuPSUG, Group Policy, PowerShell

Today I was asked to inventory the group policy objects of my customer.
Since there were a few hundred of them, we wanted to know which of them were already disabled and maybe could be deleted.
PowerShelll to the rescue!

(Get-ADForest).domains | Foreach-Object { Get-GPO -All -Domain $_ | Where-Object { $_.GPOStatus -eq "AllSettingsDisabled" } } | Select-Object -Property DisplayName

Leave a Reply