sql - ADsDSOObject query: Columns available when querying the LDAP? -


i writing vbscript query adsdsoobject, , don't quite understand structure of ldap. see how find available virtual tables in active directory, can't find available virtual columns.

also, if "select * from", returns adspath. i'd select more "name", "type", , "description" objectclass='computer' group.

dim objcomparr dim currcomp objcomparr = array() currcomp = -1  set objconnection = createobject("adodb.connection") set objcommand =   createobject("adodb.command") objconnection.provider = "adsdsoobject" objconnection.open "active directory provider"  set objcommand.activeconnection = objconnection objcommand.commandtext = "select name 'ldap://dc=mydomain,dc=com' objectclass = 'computer'" objcommand.properties("page size") = 1000 objcommand.properties("searchscope") = ads_scope_subtree  set objrecordset = objcommand.execute  if not objrecordset.eof     objrecordset.movefirst     until objrecordset.eof         currcomp = currcomp + 1         redim preserve objcomparr(currcomp)         objcomparr(currcomp) = objrecordset.fields("name")         objrecordset.movenext     loop end if 

it's easiest visually browse ad ldap browser beforehand (like the 1 softerra, adsiedit microsoft or active directory explorer sysinternals).

you able see available properties on object there , craft query accordingly.

surname called sn example, first name givenname, login samaccountname, name few.

you can query properties not set (or not defined). not error, ldap designed extensible , not every property defined on every object. empty columns result.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -