1

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?

1

If 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.

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.