title: LDAP server access via VBscript/ADO
body: <p>Can ADO access attributes other that ADsPath and Name when bound to an LDAP server?</p>
  
  <p>Below is the code I use to bind to and query a LDAP server on the internet:</p>
  
  <pre><code>Set ado = CreateObject("ADODB.Connection")                     
  ado.Provider = "ADSDSOObject"
  ado.Properties("User ID") = ""                                
  ado.Properties("Password") = ""
  ado.Properties("Encrypt Password") = False
  ado.Open "NameSearch"                                     
  
  
  serverName = "xxxxxx.xxxx.xxx"                           
  filterStr = "(objectClass=*)"     
  
  Set Ol= ado.Execute("&lt;LDAP://" &amp; serverName &amp; "&gt;;" &amp; filterStr &amp; ";ADsPath;SubTree")
  
  While Not Ol
      WScript.Echo Ol.Fields(0).value
      Ol.MoveNext                                        
  Wend
  </code></pre>
  
  <p>Also how do assign the search base in the above code to "o= xxxxxx University;c=US"?</p>