Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
objConnection = CreateObject("ADODB.Connection") objConnection.Open("Provider=ADSDSOObject") objCommand = CreateObject("ADODB.Command") objCommand.ActiveConnection = objConnection ;change these variables to alter your search ADPath="" filter="(&(objectCategory=Person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2))" fields="samAccountName,mail,employeeNumber,department" scope="subtree";all children ;scope="onelevel";Immediate children ;scope="base";no subfolders objCommand.CommandText = strCat(ADPath,";",filter,";",fields,";",scope) objRecordSet = objCommand.Execute objRecordSet.sort=("EmployeeNumber") objConnection.Close
Article ID: W16565
File Created: 2005:02:18:12:21:28
Last Updated: 2005:02:18:12:21:28