Get-ADObject
Find a domain's GUID
Perfect for if you have pwnage on one domain and the two domains trust each other!
Get-ADObject -server IP.OF.A.DC -ldapfilter '(objectClass=trustedDomain)' | select name objectguid
Output will look something like:
Name | ObjectGUID |
---|---|
7ms.internal | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |