Hi everybody, I use this code to query Active Directory, with the AD server name hardcoded:
Recently, my Active Directory server went off-line and I have to change the code of the query to point another AD Server in the forest, my question is: Is there any way to dinamically query the most-available AD server for querys instead of coding the server name..? Best regards, JD
(comments are locked)
|
If you can drop out to a command prompt or query the registry you can find a value from the system environment variable LOGONSERVER. This usually requires a logged on user to populate though. An alternative is to PING the domain name for an IP. Hi, thanks for the tip.! It won't work if the server in the LOGONSERVER variable went down after login...!
May 07, 2012 at 11:24 PM
JD
(comments are locked)
|