问题
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?
回答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.
回答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.
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)
来源:https://stackoverflow.com/questions/10035481/what-are-the-different-properties-available-in-system-directoryservices-director