我正在尝试通过Active Directory架构进行枚举,并且不认为我看到了所有属性。有人可以看看我告诉我哪里出错了吗?
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;
}
答案 0 :(得分:1)
您可能想查看我的Active Directory的C#开源浏览器:BeaverTail。
使用BeaverTail,您可以选择在“常规”AD树旁边显示Schema容器,当我在Windows 2003 Server上查看我的架构时,我会看到很多架构类!