Simon336697
asked on
Finding what Active Directory sites do not have domain controllers
Dear guys,
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:
Site-dc-yes.txt
Or
Site-dc-no.txt
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.
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:
Site-dc-yes.txt
Or
Site-dc-no.txt
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER