To | Do This |
---|---|
Make an ADO connection into Active Directory | Use the ADsDSOObject provider with ADO to talk to Active Directory |
Perform an Active Directory query | Use the Field object to hold attribute data |
Tell ADO search to cache results on the client side of the connection | Use the “Cache results” property |
Directly query a Global Catalog (GC) server | Use GC:// in your connection moniker, instead of using LDAP://, as shown here: GC:// |
Directly query a specific server in Active Directory | Use LDAP:// in your connection moniker, followed by a trailing backslash (/), as shown here: LDAP://London/ |
Query for multiple attributes in Active Directory using the LDAP dialect | Open a set of parentheses. Inside the set of parentheses, type your attribute name and value for each of the attributes you wish to query. Enclose them in parentheses. At the beginning of the expression between the first two sets of parentheses, use the ampersand (&) operator, as shown here: (&(objectCategory=computer)(name=london)) |
Use server side sorting when using the SQL dialect | Use the order by parameter followed by either the ASC or the DESC keyword, as shown here: 'user'order by sn DESC |
Return more than 1000 objects from an Active Directory ADO query | Turn on paging by specifying the PageSize property on the Command object, and supply a value for Size-Limit property |
Connect to Active Directory using alternative credentials | Specify the User ID and Password properties on the Connection object |