Find unknown SID in GPO

Yogeshwaran RYogeshwaran R
1 min read

Import-Module GroupPolicy

$gpo = Get-GPO -All

Foreach ($g in $gpo) {

$permissions = $g.getsecurityinfo()

Foreach ($p in $permissions) {

If ($p.Trustee.SidType -eq “unknown”) {

Write-Host “Policy with unknown SID: $($g.DisplayName)”

Write-Host “Trustee SID: $($p.Trustee.Sid)”

} #end if

} #end foreach permissions

0
Subscribe to my newsletter

Read articles from Yogeshwaran R directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Yogeshwaran R
Yogeshwaran R