There exists a
System.DirectoryServices
[
^] namespace holding a bunch of useful objects when dealing with Active Directory services. This is a .NET feature, so you would have to adopt one of the languages supported by the framework (c#, vb.net, f#...).
There are also a bunch of articles here on CP which deal with the subject:
Search[
^]