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

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 2022
• Windows 10
• Windows 11

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 domain user password

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

Windows 10 - powershell elevated

List the domain 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 domain 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

You need the RSAT package installed or a copy of the following DLL.

Copy to Clipboard

Load the DLL to enable the Powershell commands.

Copy to Clipboard

Optionally, use ADSI to change the password of a domain user.

Copy to Clipboard

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