Skip to content

Instantly share code, notes, and snippets.

@lansalot
Created January 16, 2020 09:38
Show Gist options
  • Save lansalot/9d3c28fda5cae930c860edadac8e0c68 to your computer and use it in GitHub Desktop.
Save lansalot/9d3c28fda5cae930c860edadac8e0c68 to your computer and use it in GitHub Desktop.
Find all group policyies without Authenticated Users permissions
Get-GPO -All | ForEach-Object {
# Test if Authenticated Users group have at least read permission on the GPO
if ('S-1-5-11' -notin ($_ | Get-GPPermission -All).Trustee.Sid.Value) {
$_
}
} | Select DisplayName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment