Enumerate Domain Trusts

This snippet enumerates standard information about domain trusts.

# import PowerView
Import-Module ..\PowerView.ps1

# enumerate all domain trusts with the default LDAP method 
Get-DomainTrust

# enumerate all domain trusts w/ .NET methods
Get-DomainTrust -NET

# enumerate all domain trusts w/ API methods
Get-DomainTrust -API

# enumerate forest trusts
Get-ForestTrust

# enumerate trusts for domain.com
Get-DomainTrust -Domain domain.com

Get-DomainForeignUser
Get-DomainForeignGroupMember -Domain domain.com

Get-DomainForeignGroupMember -Domain anotherdomain.com | %{ $_ | Add-Member Noteproperty 'ResolvedSID' $(ConvertFrom-SID $_.MemberName); $_}

Reference:

Last updated