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

♀尐吖头ヾ 提交于 2020-01-02 01:10:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!