It is very easy to add users and groups, especially using a batch file. Open up your favourite text editor, I prefer Notepad. Just start on the first line in the document begin your commands.
Example:
net user CharlesFrozen Password01 /ADD
net localgroup "Students" /add
net localgroup "Students" CharlesFrozen /ADD
On the first line you are telling the computer that you are adding a user by the name of CharlesFrozen with the password of Password01 and you are telling the computer to add him to the user group with the /Add command.
On the second line you are telling the computer to add a group by the name of "Students" then the /ADD command.
On the third line you are telling the computer to add to the "Students" group CharlesFrozen then the /ADD command.
Now to show you how to do more users and groups:
net user CharlesFrozen Password01 /ADD
net user JessicaMiller Password01 /ADD
net user JillRobber Password01 /ADD
net user KimSheep Password01 /ADD
net user ElvisAbbot Password01 /ADD
net user MikeMeathead Password01 /ADD
net user IkeOverload Password01 /ADD
net user ClintWallpaper Password01 /ADD
net localgroup "Students" /add
net localgroup "Students" CharlesFrozen /ADD
net localgroup "Students" ClintWallpaper /ADD
net localgroup "Students" IkeOverload /ADD
net localgroup "Students" MikeMeathead /ADD
net localgroup "Students" ElvisAbbot /ADD
net localgroup "Students" KimSheep /ADD
net localgroup "Students" JillRobber /ADD
net user KeithMcRay Password02 /ADD
net user KenLasery Password02 /ADD
net user LindaHiker Password02 /ADD
net user KitFinal Password02 /ADD
net localgroup "Faculty" /add
net localgroup "Faculty" KeithMcRay /ADD
net localgroup "Faculty" LindaHiker /ADD
net localgroup "Faculty" KitFinal /ADD
net localgroup "Faculty" KenLasery /ADD
The last and final step is when saving the document is to write .bat at the end of the file name that you are saving it as, BatchAddStudentAndFaculty.bat.
To deploy just right click the file and select run. You may need to select run as administrator depending on the operating system.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment