Trust Domain Enumeration

PowerView

#Get a list of all domain trusts for the current domain
Get-NetDomainTrust
Get-NetDomainTrust -Domain moneycorp.local
Get-NetDomainTrust -Domain us.dollarcorp.moneycorp.local
Get-NetDomainTrust -Domain eurocorp.local


#Get details about the current forest
Get-NetForest
Get-NetForest –Forest eurocorp.local


#Get all domains in the current forest
Get-NetForestDomain
Get-NetForestDomain –Forest eurocorp.local


#Get all global catalogs for the current forest
Get-NetForestCatalog
Get-NetForestCatalog –Forest eurocorp.local


#Map trusts of a forest
Get-NetForestTrust
Get-NetForestTrust –Forest eurocorp.local

PowerShell ActiveDirectory Module

#Get a list of all domain trusts for the current domain
Get-ADTrust
Get-ADTrust –Identity us.dollarcorp.moneycorp.local


#Get details about the current forest
Get-ADForest
Get-ADForest –Identity eurocorp.local


#Get all domains in the current forest
(Get-ADForest).Domains 



#Get all global catalogs for the current forest
Get-ADForest | select -ExpandProperty GlobalCatalogs


#Map trusts of a forest

Get-ADTrust -Filter 'msDS-TrustForestTrustInfo -ne "$null"'

Last updated

Was this helpful?