I wrote the following in a batch file
start cmd.exe /k net user test1 1qaz2wsx!QAZ@WSX /add /y
But I have to add a large number of users and passwords.
I have them all in an excel file, is there anyway for it to look at the CSV and do it?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityIf you have the list in Excel, just use Excel to generate the batch file.
You should have a column for the user name and one for the password. Then create a formula like:
=CONCATENATE("start cmd.exe /k net user ",A2," ",B2," /add /y")
Then you can copy the contents of the resulting column to a new batch file and run it.