This is a quick video about how to get information about users in active directory users and groups. You can use this like a batch file. I am using Windows Server 2008, but this also works in older versions of Sindows Server.
commands used
dsget /?
dsget user /?
dsget user “cn=Stavro Mueller, ou=people, dc=my, dc=domain” -samid
dsquery user -name “*” | dsget user -samid
In this next command, youtube won’t let me put the greater than sign.
dsquery user -name “*” | dsget user -samid -office “Greater than sign” users.txt