Pretty simple method on extracting users distinguished name (dn) data from Active Directory. dsquery.exe * -limit 0 -filter “(&(objectCategory=Person)(objectClass=User)(!userAccountControl:1.2.840.113556.1.4.803:=2))” >”c:\activeUsers.txt” Note: This will only extract active users. To gather a list of all users, simply run: dsquery user
Filed under: Active Directory, Microsoft | Tagged: Active Directory, ad, distinguished, dn, name, users | Leave a Comment »