All Non-linked GPOs
Вариант 1.
1 |
Get-GPO -All | ? { (Get-ADObject -Filter ( "GpLink -like '*{0}*'" -f $_.ID )) -eq $null } | sort DisplayName | ft DisplayName |
Вариант 2.
1 2 3 4 5 6 7 |
Get-GPO -All | %{ If ( $_ | Get-GPOReport -ReportType XML | Select-String -NotMatch "<LinksTo>" ) { Write-Host $_.DisplayName } } |