I have a list of user accounts that need their password reset to a default password (also users will be required to change the password at first login). Is there a way to reset the password for a list of Active Directory users en-mass? I'd rather not use any third party software. Can I do this in dsa.exe? Or can this be done with a power-shell script? I've seen some examples that reset the passwords for all users in an OU but this will not work for me. I need to reset the passwords for only 50 of 300 users in the same OU.


If all accounts are to be reset to the same password, you could probably do something like this:

for /f %%u in (users.txt) do @net user %%u PASS /logonpasswordchg:yes /domain
| improve this answer | |


You can loop and read in the names of the accounts you need to reset from a .csv of the usernames, which you hopefully already have in a list somewhere.

If you have the AD module for PowerShell, it's even easier (you can also read in a .csv of the usernames with this method, instead of using a filter).

First, you need to import ActiveDirectory Module

Import-Module ActiveDirectory

Second, generate a SecureString which contains the password.

$securePwd = ConvertTo-SecureString -String "P@ssw0rd!" -Force -AsPlainText

Third, find the Active Directory users ,and use Set-ADAccountPassword for resetng the password.

Get-ADUser -Filter {Name -like "Test"} | Set-ADAccountPassword -NewPassword $securePwd*

Also, you can review following link for more details about the Active Directory cmdlets.

Active Directory Cmdlets in Windows PowerShell


| improve this answer | |

This question is already been discussed at the community before. Please refer to this link

How do I bulk reset passwords for all users in an OU?

and you can go for this link also Mass password change at active directory


ELse go for a freeware tool such as Lepide Active Directory Self service. It will allow you to change the password for limitation up to 50 users.

| improve this answer | |
  • The question specifically states that the users are not all in the same OU. How does the other question you linked relate to this one, then? – Adrian Heine Nov 22 '12 at 12:41

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.