views:

21

answers:

1

I'm trying to enumerate through the Active Directory schema and don't think I'm seeing all the attributes. Could someone take a look and tell me where I'm going wrong?

objRoot = new DirectoryEntry("LDAP://" + serverName + ":" + port + "/RootDSE");
strSchemaNamingContext = objRoot.Properties[ "schemaNamingContext"].Value.ToString();

objSchema = new DirectoryEntry(String.Concat("LDAP://" + serverName + ":" + port + "/", strSchemaNamingContext));

foreach (DirectoryEntry schemaObjectToTest in objSchema.Children)
{
   var rest = schemaObjectToTest.Properties["systemFlags"].Value;
}
A: 

You might want to check out my C# open source browser for Active Directory: BeaverTail.

With BeaverTail, you can opt to show the Schema container alongside your "regular" AD tree, and when I look at my schema on a Windows 2003 Server, I see quite a few schema classes!

alt text

marc_s