2008/10/29

ldapsearch against AD (or other directory)

find all computer objects in a domain, print their cname's (host names):

ldapsearch -b "dc=mydomain,dc=com" -D "cn=myadminaccount,ou=Users,dc=mydomain,dc=com" -H ldap://mydomaincontroller/ -W -x "(objectclass=Computer)" cn

No comments: