How can I create a PowerShell script to open the Windows "Change Password" screen automatically?
Asked by
TechWizard92
I'm looking for help with a PowerShell script that can automatically bring up the "Change Password" screen on Windows. We have a 90-day password expiration policy in our organization, and end-users need to navigate to that screen by pressing Ctrl + Alt + Del and selecting "Change a password" before their passwords expire. If they miss that, our IT team ends up resetting their passwords, which is a hassle for everyone.
We don't have password write-back enabled and only issue notifications to remind users before expiration. I even send them reminders via email, but I still find myself resetting passwords pretty often. I'm hoping to run a PowerShell script through group policy a week before passwords expire to prevent this issue. Is there a way to accomplish this?
Answers
If a password expires, Windows should prompt users to change it automatically upon login. You might want to review your group policy settings instead of using a PowerShell script. But if you're still keen on a script, I've heard about using this command: (New-Object -COM Shell.Application).WindowsSecurity(). It doesnโt directly press the change password button thoughโit's more of an alternative.
Reply to this answer
It's odd that IT needs to intervene for password changes. Normally, when a password expires, it prompts users to change it at login if they know their old password. If you're aiming for a self-service password reset (SSPR), consider third-party solutions instead of a scriptโlike what we use from SpecOps. It's more efficient than piecing together something on PowerShell.
Reply to this answer
You might want to look into setting a scheduled task that forces the change password prompt on login. That could be set to activate a week before the expiration. It could streamline the process for your users.
Reply to this answer
Honestly, I think the best solution is to enable password write-back. You'll save a lot of time compared to trying to work around the existing system. I would do it if it were up to me, but I know it can be a tough sell to management. Maybe present them with how much time could be saved?
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions