The .NET Framework System.DirectoryServices namespace

The System.DirectoryServices namespace contains two component classes, DirectoryEntry and DirectorySearcher, which use the ADSI technology.
The DirectoryEntry class encapsulates a single entry in the Active Directory database hierarchy. Use this class for binding to objects, reading properties, updating attributes and enumerating children. You can delete objects, create child objects, modify the attributes on objects or read attributes off of objects.
The DirectorySearcher Class allows us to perform queries against the Active Directory Domain Services hierarchy. Executing a search through DirectorySearcher returns a SearchResult, which are contained in an instance of the SearchResultCollection class. A SearchResult or a SearchResultCollection is a read-only representation of these objects. If you want to do any read/write operations with them, you need to convert it to a DirectoryEntry object.

Speak Your Mind