Retrieves Active Directory information : Read : Directory Services C# Examples


C# Examples » Directory Services » Read »

 

Retrieves Active Directory information









    
using  System;
using  System.DirectoryServices;

class  MainClass
{
    public  static  void  Main()  
    {
        DirectoryEntry  de  =  new  DirectoryEntry("WinNT://DomanName/MachineName",  "Administrator",  "Password");

        foreach(DirectoryEntry  child  in  de.Children)  
        {
            Console.WriteLine(child.SchemaClassName  +  ":  "  +  child.Name);
        }
    }

}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Directory Services
» Read