What are the different properties available in System.DirectoryServices.DirectorySearcher.PropertiesToLoad

33,939

Solution 1

You can put any of the valid LDAP attributes into PropertiesToLoad - see a list of all Active Directory attributes here - what you need is the Ldap-Display-Name for each attribute you're interested in.

Also: Richard Mueller has a site with lots of good info on AD and LDAP - including Excel spreadsheets of the AD attributes (and also a mapping from the Active Directory User & Computer tool to the actual AD attributes being set on those various dialog screens.

Solution 2

Active-Directory as any other Directories contains objects that are discribed by a Schema. The Schema discribe each type (class) of object that can be inserted in the Directory and for each type give the attributes (properties) that it supports.

The Schema can be extended by an application (like Exchange for example), you can have a look to the schema in your AD registering the MMC provided for that :

regsvr32 C:\Windows\System32\schmmgmt.dll

Then you can load MMC.EXE program and have a look to the class you are intested in, and the attributes it provides.

Schema management MMC

To see all all the objects in you Direcory with all their attributes you can use the LDP.EXE program (comming from support kit in W2K3 natively install on W2K8 AD server)

LDP program

Share:
33,939
ganders
Author by

ganders

I'm a software developer in Des Moines, IA. I love what I do, but wish I had more time to do it. Those darn kids get in the way...

Updated on August 01, 2022

Comments

  • ganders
    ganders almost 2 years

    Everything I've googled just says you can add them as a string array, but doesn't say what the available options are.

    What are all the different properties that are available from Directory Services?