Source: Active Directory · Reset an AD Password in 20 Seconds — PowerShell vs ADUC · Click Less, Script More
Someone is locked out, or they have forgotten their password, and the helpdesk queue is growing. In Active Directory Users and Computers you can fix it — if you can find the right user, in the right OU, without clicking the wrong account. In PowerShell you can do the same reset in about 20 seconds, and you can do 30 users in one go. This post shows you both, and why the command line wins when the queue is long.
The problem
Password resets are one of the most common helpdesk jobs, and one of the easiest to get wrong under pressure. A user cannot log in, their work is stopped, and every minute you spend hunting through ADUC is a minute they are waiting. Worse, a reset that is done in a hurry can go to the wrong account, or the user can be left with a password they were never told to change — which is a security risk, not just an inconvenience.
When one reset becomes ten, or thirty after a security incident, clicking through ADUC one user at a time is no longer a good use of an admin’s time. You need a method that is fast, repeatable, and easy to check afterwards.
The slow way
The slow way is ADUC: open Active Directory Users and Computers, find the OU, find the user, right-click, choose Reset Password, type the new password twice, and tick the box to force a change at next logon. Then repeat the whole process for the next user. It works for one person, and it is a good way to learn what a reset does — but it is slow, it is hard to audit, and after the fifth user it is very easy to click the wrong name.
ADUC also gives you no record of what you did, unless you write it down yourself. If a manager later asks which accounts were reset, and when, you have nothing to show except your memory.
The fast way
Run these commands in PowerShell on a machine with the Active Directory module. The example user is jlim, and the temporary password is Temp@2026! — change it to a strong temporary password of your own, and make sure the user changes it at first logon.
Step 1 — Check the user first. Confirm you have the right account before you change anything:
Get-ADUser -Identity jlim
Step 2 — Reset the password. Set a new temporary password for jlim:
Set-ADAccountPassword -Identity jlim -Reset -NewPassword (ConvertTo-SecureString "Temp@2026!" -AsPlainText -Force)
Step 3 — Force a change at next logon. The user must choose their own password the next time they sign in:
Set-ADUser -Identity jlim -ChangePasswordAtLogon $true
Step 4 — Reset 30 users at once. Put one username per line in reset-list.txt, then run this loop. It resets each user in the file and forces a password change at next logon:
$users = Get-Content reset-list.txt
foreach ($user in $users) {
Set-ADAccountPassword -Identity $user -Reset -NewPassword (ConvertTo-SecureString "Temp@2026!" -AsPlainText -Force)
Set-ADUser -Identity $user -ChangePasswordAtLogon $true
}
That is the whole job: check, reset, force a change, and — when there are many users — loop through the list instead of clicking through them one by one.
What you should see
Get-ADUser -Identity jlim should return the user’s details, including their name and distinguished name, so you can confirm it is the right person. The reset commands should return with no error, which in PowerShell means they ran. After the reset, the user should be able to sign in with Temp@2026! and then be prompted to choose a new password straight away. For the 30-user loop, each user in reset-list.txt should be reset in turn, with no errors for names that do not exist — if a name is wrong, PowerShell will tell you, and you can fix that one line.
If it fails
If Get-ADUser says the user cannot be found, check the spelling of jlim and that you are connected to the right domain. If Set-ADAccountPassword reports that the password does not meet complexity requirements, choose a longer temporary password that meets your domain password policy. If the loop fails on one user, check that reset-list.txt has one username per line, with no blank lines or extra spaces. And if a user can sign in with the temporary password but is not asked to change it, run the Set-ADUser command again and check the ChangePasswordAtLogon setting.
Tools used
PowerShell with the Active Directory module, and Active Directory Users and Computers (ADUC) for comparison. No add-ins and no affiliate link are needed for this post.
Watch the video: https://www.youtube.com/@clicklessscriptmore
Next step
Try the single-user reset in your lab first, with a test account — not a real user. Then build a small reset-list.txt with two or three test accounts and run the loop. Once you have seen it work in the lab, you will be ready the next time the helpdesk queue fills up with password resets — and you will finish them in minutes, not hours.
Lab demo · sample data. Test in a lab first.