我試圖獲取 Active Directory 的類和屬性列表。DirectoryEntry entry = new DirectoryEntry( "LDAP://CN=Schema,CN=Configuration,DC=addomain,DC=com", null, null, AuthenticationTypes.Secure);ActiveDirectorySchema schema = ActiveDirectorySchema.GetCurrentSchema();ActiveDirectorySchemaClass User = schema.FindClass("account");foreach (ActiveDirectorySchemaProperty property in User.GetAllProperties()){ Console.WriteLine("{0}", property.Name);}這將返回指定類的所有屬性。如何獲取 Active Directory 中存在的所有類?
如何在 C# 中獲取 Active Directory 的類列表
寶慕林4294392
2021-08-22 14:57:29