Generating Random users in Development/Testing/Demo Environments

I have to build out development, testing, and demo environments on a regular basis. Almost every new client requires a fresh new deployment. No matter which stage of the SDLC you are in, it helps with development to have content to work with in the environment to see how things will function in true to life scenarios. The issue that I often run into when deploying whole new environments, is the creation of the user base, the establishment of a hierarchy in the Active Directory, establishment of mailboxes, and general user content. This might not be important in general application development, but when you are dealing with Active Directory integration, or integrating systems that rely on active directory, it helps tremendously to have those users.

It also makes a demo look a lot better when you have simulated use and content from hundreds or thousands of users.

There are a ton of scripts out there on the internet to create 1000+ users with the same name, then go through and rename / enable all those users, but I thought it would be a lot easier to create 1000 randomly named users with values populated in one shot. The following script utilizes LDAP://ROOTDSE to work in any environment (I find it to be a pain to rewrite scripts for every new domain and environment). Included is a CSV with 10,000 randomly generated names and middle initials.

http://cid-9ba34c54246af67c.office.live.com/embedicon.aspx/Public/Generateusers.zip

Update 11/4/2010: Recently ran into the issue of this not working on X64 servers (ADODB.Connection: Provider cannot be found.  It may not be properly installed.), check out this post for a working solution. http://blog.sapien.com/index.php/2007/04/27/the-missing-x64-jet/

Leave a comment