Creating Dummy (Test) Users

by Mitch Tulloch [Published on 20 March 2008 / Last Updated on 20 March 2008]

How to create a bunch of dummy or test users quickly in Active Directory.

Occasionally when testing a prototype Active Directory environment, you may need to create a large number of dummy domain users for testing purposes. You could go through the pain of creating a CSV file and using LDIFDE to create them, but here’s a much easier way. Simply use the FOR command together with DSADD to create users named user1, user2, user3 and so on. For example, to create 100 dummy users in the Vancouver OU of the domain, run the following at a command prompt on your domain controller:

for /L %d in (1,1,100) do dsadd user cn=user%d,ou=Vancouver,dc=contoso,dc=com

Alternatively, you can replace % with %% and run the command within a batch file:

for /L %%d in (1,1,100) do dsadd user cn=user%%d,ou=Vancouver,dc=contoso,dc=com


Mitch Tulloch was lead author for the Windows Vista Resource Kit from Microsoft Press, which is the book for IT pros who want to deploy, maintain and support Windows Vista in mid- and large-sized network environments. Mitch was also the author of Introducing Windows Server 2008 and technical project lead for the Microsoft Office Communications Server 2007 Resource Kit, both books also from Microsoft Press. For more information on these and other books by Mitch, see

See Also

The Author — Mitch Tulloch

Mitch Tulloch is a well-known expert on Windows Server administration and cloud computing technologies. He has published over a thousand articles on information technology topics and has written, contributed to or been series editor for over 50 books.

Featured Links