Skip to content

Instantly share code, notes, and snippets.

@roberttoups
Created November 4, 2020 15:39
Show Gist options
  • Save roberttoups/a64efb16b482f6a78ebbbd3e0ee21bb1 to your computer and use it in GitHub Desktop.
Save roberttoups/a64efb16b482f6a78ebbbd3e0ee21bb1 to your computer and use it in GitHub Desktop.
View all the Master Root Keys in the Forest
$DomainDistinguishedName = Get-ADDomain |
Select-Object -ExpandProperty 'DistinguishedName'
$SearchBase = "CN=Master Root Keys,CN=Group Key Distribution Service,CN=Services,CN=Configuration,$DomainDistinguishedName"
Get-ADObject -Filter '*' -SearchBase $SearchBase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment