Share via


Setting a User's Password

Applies To: Windows Server 2008 R2

This topic explains how to use the Active Directory module for Windows PowerShell to set a user’s password.

Example

The following example demonstrates how to set the password for the user account U1.

Set-ADAccountPassword –Identity U1 -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "p@ssw0rd" –Force)

Additional information

For a full explanation of the parameters that you can pass to Set-ADAccountPassword, at the Active Directory module command prompt, type Get-Help Set-ADAccountPassword –detailed.