read only domain controllers
am 26.12.2007 05:53:00 von SameekshaNot sure which newsgroup this question should go to.
I want to find out, using .net c# code whether a domain controller on the
given machine is read only.
The logic I am using is as follows -
1. Use System.Management namespace - ManagementObject and ObjectSearcher
classes
2. First find out domain name for the given machine using
Win32_ComputerSystem class - DomainName property
3. Use the domain name obtained in step 2 to query Win32_NTDomain class for
the domain objects which have the given domain name
4. Iterate through these objects, find an object whose
DSPrimaryDomainControllerFlag is set to true. Read its DSWritableFlag
property. If it is false, the domain controller is read only.
Does this logic seem ok?
Posting the question since at present I am not able to test this code on a
machine with read only domain controller.
--
Thanks,
Sameeksha
MCAD.Net