0

I was wondering if there's a way to change the password for all users at once on the command prompt. Maybe using net user? If not can you tell me a way to get all the users from a batch file and then change all their passwords from there? Thanks

Luke Dinkler
  • 731
  • 5
  • 16
  • 36

2 Answers2

1

step 1: Type net user in the command line and hit Enter. This will show down all the users of the computer.

step 2: net user <username> *

step 3: net user nameoftheuser *

You will be asked to enter a password for the user and then retype it.

Note: This will only let you change one password at a time

  • Yes. and unfortunately thats not what i'm looking for. I'm either looking for 1 command to change the password for all users at once, or a way to get all the users in a batch script and change the password with net user – Luke Dinkler Dec 02 '14 at 23:21
1

If the Powershell command prompt is available, this link will get you where you want to be. Basically, use the technique described in this SO link to build a list of users, and away you go.

If you don't have access to Powershell, then you can use WMI via VBScript to fetch a list of users, and/or change passwords.

Community
  • 1
  • 1
Bukes
  • 3,668
  • 1
  • 18
  • 20
  • This doesn't work either because it's for use on other computers, and I can't install anything – Luke Dinkler Dec 02 '14 at 23:30
  • If the machines in question don't have Powershell, you can also use accomplish this using WMI via VBScript. Most Windows machines come with support for VBScript (via cscript.exe/wscript.exe). Updated answer with links to examples. – Bukes Dec 02 '14 at 23:35
  • that's not an option either. I already am using batch. Thanks anyway – Luke Dinkler Dec 02 '14 at 23:37
  • What is stopping you from invoking scripts from your batch files? – Bukes Dec 02 '14 at 23:40
  • Yes. That would be a good option, but I don't think I need this anymore. Thanks for the help! – Luke Dinkler Dec 02 '14 at 23:46