I’m on a Windows 2008 server and would like to delete 15 users (user1 till user15) without having to do this by hand.
After deleting them completely I’d like to readd them (again, with a script) and give all of them the same password for which the script should ask for.
Any help (hints, complete script) is appreciated.
You can use the "net user" command to add and delete accounts.
Here is a generic batch file that will LOOP:
In the loop you would need to do two things:
You can modifiy the batch file to take a third argument which could be the password that is then passed on to the "net user /add" command.
Use "net help user" to get more information on how to use the command.