The namespace provides easy access to Active Directory Domain Services. The namespace contains two component interfaces, DirectoryEntry and DirectorySearcher , which use the Active Directory Services Interfaces (ADSI) technology. ADSI is the set of interfaces that Microsoft provides as a flexible tool for working with a variety of network providers. ADSI gives the administrator the ability to locate and manage resources on a network with relative ease, regardless of the size of the network. The namespace interfaces are defined as Classes and interfaces in C# System.DirectoryServices namespaces.
The example below uses DirectoryEntry interface.