DSQUERY is a command line tool that comes with Windows 2003 server. This utility can be run locally or copied off to a domain joined XP workstation for use. To generate a list of users from Active Directory, navigate to the utility’s directory via command prompt.
Use the folowing example to dump a list of all accounts to a .txt file named netusers at the root of the C drive.
dsquery user -o rdn -limit 500 >C:\netusers.txt Continue reading “Using the DSQUERY utility to print a system generated list of Active Directory users”