Way to reset the password for a list of Active Directory users en-mass

active-directorybatchbulkpasswordreset

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.

Best Answer

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