I hope you are all well.
We often have the issue whereby for whatever reason, we may go into AD sites and subnets, and find that a domain controller does not exist for a site.
What I woukd like to do is the following:
Build a query that:
1) Returns a list of all AD sites
2) For each site, query the presence of an NTDS settings object
3) Depending on the outcome of step 2), write the site name to one of 2 possible files:
So, for example, a site that has no NTDS settings object means it has no domain controller, so write its site name to the file: Site-dc-no.txt
Any help greatly appreciated.