Freigeben über


How to bulk create 10000 users and groups for your test environment

For test lab scenarios where you quickly want to add a few thousand users you can run the following batch files in a DC:

:Creates 10000 disabled user accounts with password Password1
For /l %%t IN (1,1,10000) do net user BulkUser%%t Password1 /add /PASSWORDREQ:YES /ACTIVE:NO

:Bulk create 1000 groups
For /l %%t IN (1,1,1000) do net group Bulkgroup%%t /add /domain

Comments

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    September 12, 2012
    I received the following error when running the first command:   "%%t was unexpected at this time."

  • Anonymous
    March 26, 2013
    Instead of %%t, use %t