Created
January 16, 2020 09:38
-
-
Save lansalot/9d3c28fda5cae930c860edadac8e0c68 to your computer and use it in GitHub Desktop.
Find all group policyies without Authenticated Users permissions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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