I just learned this little nugget of goodness from the Microsoft Dynamics CRM 4.0 Performance Toolkit. If you want to quickly create 200 AD users for data migrations, Organization imports or performance testing you can simply us the NET USER command like so:
for /L %i in (1,1,200) do net user CrmTestUser%i p@ss1word /ADD /domain
This says, create 200 domain users with the name CrmTestUser(1-200) with the password of “p@ss1word”. Digging deeper, there are more options so you can get a bit fancier. This version adds a description, full name and prevents the user from changing their password:
for /L %i in (1,1,200) do net user CrmTestUser%i p@ss1word /ADD /comment:"Test user for CRM Performance Testing" /fullname:"Test User%i” /passwordchg:no /domain
To remove them when you are done you can use the following command:
for /L %i in (1,1,200) do net user CrmTestUser%i /DELETE
Pretty fancy,
This posting is provided "AS IS" with no warranties, and confers no rights.