Skip to main content
February 5, 2009
Question

CFLDAP query computers

  • February 5, 2009
  • 1 reply
  • 503 views
Hello,

I would like to know how I go about retrieving a full list of computers from AD using CFLDAP.

I have successfully done this for users using the following code and it works a treat. Does anyone know how I acheive the same thing but for computers?

<cfldap action="QUERY"
name="results"
attributes="userPrincipalName,description,physicalDeliveryOfficeName,samaccountname,cn,ou,dn"
start="ou=People,dc=*****,dc=**,dc=com"
scope="SUBTREE"
filter="(&(objectCategory=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))"
sort="cn ASC"
server="server"
username="****"
password="****">
    This topic has been closed for replies.

    1 reply

    tclaremont
    Inspiring
    February 6, 2009
    Contact the domain admin, and ask what field they store the computer name in. They may or may not store the computer name, do dont be suprised at the answer either way.

    You might try putting a simple "*" in the attributes and then doing a CFDUMP to see what it returns. Usually this is disabled by the domain admin, though.