結構使える気がするよ。
1 |
$list = Get-ADObject -Filter * | Where-Object {$_.ObjectClass -eq "organizationalUnit"} | Select-Object -Property DistinguishedName ; ($list | ForEach-Object {Get-GPInheritance -Target $_.DistinguishedName}).GpoLinks | Select-Object -Property DisplayName,Target |