Skip to content

Instantly share code, notes, and snippets.

@JimSycurity
Created November 21, 2023 15:40
Show Gist options
  • Select an option

  • Save JimSycurity/5d82c24fa557251a862a9035b9be31ee to your computer and use it in GitHub Desktop.

Select an option

Save JimSycurity/5d82c24fa557251a862a9035b9be31ee to your computer and use it in GitHub Desktop.
Get-ADTrustedDomainObjects
## Gather raw attributes for AD Trusted Domain Objects
$TDOs = @()
[array]$TDOs = Get-ADObject -SearchBase (Get-ADRootDSE).defaultNamingContext -LDAPFilter '(trustType=*)' -Properties *
## Essential Attributes of a Trusted Domain Object: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/c9efe39c-f5f9-43e9-9479-941c20d0e590
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment