Report all domain controllers in current domain and trusted domains with powershell
• Mike Tupker
I recently had need to come up with a way to document large chunks of our active directory environment. i came up with the below script. It gets all direct trusts then gets domain controller information for each DC in the trusted domains.
If a domain doesn’t have web services enabled or isn’t reachable, it just records the domain name with empty values.
Right now it’s gathering Domain, server name, global catalog status, IPV4 address, IPV6 address, site, OS, and service pack for all reachable DCs.