To list the name, department, and manager of all users in an Active Directory OU:
dsquery user -limit 200 OU=UserOU,OU=Sales,DC=contoso,DC=com | dsget user -ln -fn -dept -mgr > users.txt
Full documentation of Dsquery user and Dsget user.
To list the name, department, and manager of all users in an Active Directory OU:
dsquery user -limit 200 OU=UserOU,OU=Sales,DC=contoso,DC=com | dsget user -ln -fn -dept -mgr > users.txt
Full documentation of Dsquery user and Dsget user.