Searching Active Directory

This is a quick way to search Active Directory from the cmd line:

dsquery user -name * -limit 0

Just pop the name or name + wildcard where the * is.  If you want to reduce the output to the relative distinguished name then just add:

dsquery user -name * -limit 0 -o rdn
Written on September 3, 2008