LsaEnumerateTrustedDomains($server, \@domains) Enumerates all trusted domains. If you execute this on a workstation or a member server, you'll get your domain and the domain sid. If you execute this on a PDC or BDC, you'll get a list of all trusted domains and their sid's.