Directory Services C# Tutorial

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);
    }
  }
}