Automatically Adding Users to a Windows 2003 Server

27. November 2006 13:35 by Csaborio in General  //  Tags:   //   Comments (0)

A crucial part when carrying out training labs is setup. Without a well thought plan that takes into consideration everything that can go wrong (because it will), your labs are toast. We've done about ~70 trainings so far and in every one of them something pops up. With more and more trainings, you start to develop a sixth sense of complete and utter pessimism that will help you identify problems before they even show up.

That being said, we are in the middle of testing all of the setup for a series of Virtualization training labs in December 2007. We needed a way to quickly and painlessly add a bunch of users to a Windows 2003 Server. The following is the series of commands to create a user callled student1 on the server with Administrative priviledges that belongs to domain admins and an account that never expires:

net user student1 p@ssw0rd /ADD /DOMAIN
net group "domain admins" student1 /ADD /DOMAIN
net localgroup Administrators student1 /ADD
net accounts /maxpwage:unlimited /DOMAIN

There are plenty more of options so check out the net command to find a command that best suits your need.