[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 305
  • Last Modified:

Reset the password of all users in a file.

Hi,
I have a file which has many user names.Is there a way to reset all the users password in one shot.

Regards
Sharath
0
bsharath
Asked:
bsharath
  • 2
1 Solution
 
oBdACommented:
Replace the password variable with the one you want to use; don't use characters with special meanings in batch files, like ^, <, >, |, %, &:

@echo off
set Password=TopSecret
for /f "tokens=1" %%a in ('type ResetPasswords.txt') do net user %%a %Password% /domain
0
 
bsharathAuthor Commented:
oBdA

What are the changes i need to do...
0
 
oBdACommented:
Just the password to use (in the example "TopSecret"), and the file name (in the example "ResetPasswords.txt").
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now