Use .NET System.directoryServices
DirectoryEntry and DirectorySearcher two classes can more convenient to query and modify some of the data in the AD
DirectorySearcher supports faster query
Use FindAll () and FindOnd ()
DirectoryEntry can also be responsible for writing data into the machine.
The information is written to the AD again via COMMITCHANGES.