title: ADsDSOObject query: Columns available when querying the LDAP?
body: <p>I am writing a VBScript to query ADsDSOObject, and I don't quite understand the structure of the LDAP. I see how to find the available virtual tables in Active Directory, but I can't find where to look for the available virtual columns.</p>
  
  <p>Also, if I "SELECT * FROM", it only returns the ADsPath.  I'd like to select more than just "Name", "Type", and "Description" from the objectClass='Computer' group.</p>
  
  <pre><code>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 FROM 'LDAP://DC=mydomain,DC=com' WHERE objectClass = 'Computer'"
  objCommand.Properties("Page Size") = 1000
  objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE 
  Set objRecordSet = objCommand.Execute
  
  If Not objRecordSet.EOF Then
      objRecordSet.MoveFirst
      Do Until objRecordSet.EOF
          currcomp = currcomp + 1
          ReDim Preserve objCompArr(currcomp)
          objCompArr(currcomp) = objRecordSet.Fields("Name")
          objRecordSet.MoveNext
      Loop
  End If
  </code></pre>