> For the complete documentation index, see [llms.txt](https://doc.sitecorepowershell.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.sitecorepowershell.com/appendix/security/set-userpassword.md).

# Set-UserPassword

Sets the Sitecore user password.

## Syntax

Set-UserPassword \[-Identity] \<AccountIdentity> -OldPassword \<String> \[-NewPassword \<String>]

Set-UserPassword \[-Identity] \<AccountIdentity> -Reset \[-NewPassword \<String>]

## Detailed Description

The Set-UserPassword command resets or changes a user password.

The Identity parameter specifies the Sitecore user to remove. You can specify a user by its local name or fully qualified name.

© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions

## Parameters

### -Identity \<AccountIdentity>

Specifies the Sitecore user by providing one of the following values.

```powershell
Local Name
    Example: admin
Fully Qualified Name
    Example: sitecore\admin
```

| Aliases                     |                |
| --------------------------- | -------------- |
| Required?                   | true           |
| Position?                   | 1              |
| Default Value               |                |
| Accept Pipeline Input?      | true (ByValue) |
| Accept Wildcard Characters? | false          |

### -NewPassword \<String>

| Aliases                     |                       |
| --------------------------- | --------------------- |
| Required?                   | false                 |
| Position?                   | named                 |
| Default Value               |                       |
| Accept Pipeline Input?      | true (ByPropertyName) |
| Accept Wildcard Characters? | false                 |

### -OldPassword \<String>

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | true  |
| Position?                   | named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

### -Reset \<SwitchParameter>

| Aliases                     |       |
| --------------------------- | ----- |
| Required?                   | true  |
| Position?                   | named |
| Default Value               |       |
| Accept Pipeline Input?      | false |
| Accept Wildcard Characters? | false |

## Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

* System.String

  Represents the identity of a user.

Sitecore.Security.Accounts.User Represents the instance of a user.

## Outputs

The output type is the type of the objects that the cmdlet emits.

* None.

## Notes

Help Author: Adam Najmanowicz, Michael West

## Examples

### EXAMPLE 1

```powershell
PS master:\> Set-UserPassword -Identity michael -NewPassword pass123 -OldPassword b
```

### EXAMPLE 2

```powershell
PS master:\> "michael","adam","mike" | Set-UserPassword -NewPassword b -Reset
```

## Related Topics

* <https://github.com/SitecorePowerShell/Console/>
* [Get-User](/appendix/security/get-user.md)
* [Set-User](/appendix/security/set-user.md)
