retrieves Active Directory information : Active Directory « Web Services « C# / C Sharp






retrieves Active Directory information


using System;
using System.DirectoryServices;

public class Example21_16 
{

  public static void Main() 
  {

    // connect to AD
    DirectoryEntry de = new DirectoryEntry(
      "WinNT://DomanName/MachineName", "Administrator", "Password");

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

}




           
       








Related examples in the same category

1.Using DirectorySearcher
2.DirectoryServices DirectoryEntry
3.DirectoryEntry Get PropertiesDirectoryEntry Get Properties
4.DirectoryEntry : List Objects
5.DirectoryServices:Modify Property
6.DirectoryEntry and DirectoryEntries
7.DirectoryEntry Rename Object
8.DirectoryServices: Simple Search
9.DirectoryServices: Add Object
10.DirectoryServices: Add Property
11.DirectoryServices Bind ObjectDirectoryServices Bind Object
12.DirectoryServices: Delete Object
13.DirectoryServices GUI