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