Retrieving all Active Directory schema properties

Sometimes, you need to retrieve all current Active Directory schema properties.


//connect to AD and get the schema properties.
ActiveDirectorySchema schema=ActiveDirectorySchema.GetCurrentSchema();
ReadOnlyActiveDirectorySchemaPropertyCollection properties = schema.FindAllProperties();

Properties will contain a collection of all the current AD properties. you can check whatever properties’ values. For example, properties[0].Name, properties[0].IsSingleValued

Advertisements