I Need to fetch GPO policy attached with the specific GPO and what delegation permissions are linked to the GPO, for eg we have a delegation tab where we add Machin/ User level permission instead of Authenticated User using Powershell
here I'm importing all the client devices and fetching where this client device are attached to which GPO as delegation permission. But not getting any error or data blank report is fetched and it took 15 mins to ran this
$Computers = Import-Csv C:\Users\User\Desktop\Computers.csv Get-GPO -All -Domain "test.com" | foreach-object { if($_ | Get-GPPermission -TargetName "$($Computers.Name)" -TargetType Computer -ErrorAction SilentlyContinue) {$_.DisplayName}} | export-csv -path c:\users\delegation.csv -append