Dcdiag usage
Can we use dcdiag to check whether AD is installed on a machine ?
Or is there any other reliable method to find out this ?
Basically I wasnt to check if AD is available and then I need to extend the schema with 2 new attributes .... Please help
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sam HobbsRank #107 · 20.5K reputationPosted Nov 9, 2009, 7:43 PM EST
What happens if you attempt to connect with AD in a system that it is not installed in? You should get a specific error and then you know that when you get that error, AD is not installed. Perhaps you can use code such as the following, except check the exception for whatever specific exceptions you need to check for.
Madan3 reputationPosted Nov 11, 2009, 4:18 AM EST