How to change password using PowerShell on Windows 11

In Windows 11, you can use PowerShell commands to change a local account’s password in addition to the Command Prompt and Control Panel.

If the password has not been compromised, changing it is generally not advised as it may result in numerous additional issues. You may use PowerShell to reset your Windows 11 account’s password, though, if it has been compromised or you’ve discovered it’s simple to figure out.

This post will teach you how to use PowerShell to modify a Windows 11 local account’s current password.

Change account password on Windows 11 with PowerShell

Use these procedures to modify a local account password on Windows 11 using a PowerShell command:

LaunchStart.

Look up “PowerShell,” then right-click on the first result and choose “Run as administrator.”

To display every account that is available, use the following command and hit Enter:

Get-LocalUser command

To generate and save the new password in a variable, use the following command and hit Enter:

Press Enter after entering the account’s new password.

To apply the new password to the local account, type the following command and hit Enter on each line:

Make sure to substitute the account name for tempuser in the second command to reset the password.

Change password PowerShell command

After finishing the procedures, use the new password to log out of Windows 11 and back in.

Use this other guide if you need to reset a password using the Command Prompt. Additionally, although the instructions in this post are geared toward Windows 11, they should also work with Windows 10, Windows 8.1, and Windows 7.

Leave a Comment