Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$AppliedGPOs = $(Get-WmiObject -Namespace 'ROOT\RSOP\Computer' -Class RSOP_GPLink -Filter "AppliedOrder <> 0" | Select @{n='GPO';e={$_.GPO.Replace("RSOP_GPO.","")}} | Select -ExpandProperty GPO)
Get-WmiObject -Namespace 'ROOT\RSOP\Computer' -Class 'RSOP_GPO' -Filter $AppliedGPOs[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.