Bulk user and computer creation in AD

If all you need to do is create a bunch of users and computers for a test environment you can use these simple little scripts at the command line – just change to your domain/OU:

FOR /L %i in (1,1,500) DO dsadd user “cn=MyUser%i,ou=MyOU,dc=domain,dc=local” -samid MyUser%i -upn myuser%i@domain.local -fn My -ln User%i -display “MyUser%i” -pwd P@ssw0rd -disabled no

FOR /L %i in (1,1,500) DO dsadd computer “cn=MyClient%i,ou=MyClientOU,dc=domain,dc=local”

Leave a Reply