Would you like to learn how to change a local user password using Powershell? In this tutorial, we are going to show you how to use Powershell to set the password of a local user account on a computer running Windows.

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10

Equipment list

Here you can find the list of equipment used to create this tutorial.

This link will also show the software list used to create this tutorial.

Related tutorial – PowerShell

On this page, we offer quick access to a list of tutorials related to PowerShell.

Tutorial Powershell – Changing a local user password

As an Administrator, start an elevated Powershell command-line.

Windows 10 - powershell elevated

List the local user accounts.

Copy to Clipboard

Here is the command output:

Copy to Clipboard

Request the username and the new password.

Copy to Clipboard

Enter the requested information.

Powershell - Local credential

Change the password of a local user account.

Copy to Clipboard

Optionally, prompt for a username and a password using the command line.

Copy to Clipboard

Change the password using a plain text password.

Copy to Clipboard

In our example, we configured the password of a local account named GOHAN.

The following password was set to this user account: 123QWE@@.

Congratulations! You are able to change a local user password using Powershell.