security-set-user-password
Sets a new password for a Sitecore user by validating the current password or performing an administrative reset without the current password.
Instructions
Sets a new password for a Sitecore user. Supply either 'oldPassword' (validated before the change) or 'resetPassword: true' (an administrative reset that does not need the current password) — SPE offers no third way to change a password.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| identity | Yes | The identity of the user to update the password for (e.g. 'admin' or full path 'sitecore\admin') | |
| newPassword | Yes | The new password for the user | |
| oldPassword | No | The user's current password, validated before the change. Supply this or 'resetPassword: true'. | |
| resetPassword | No | Administrative reset: change the password without knowing the current one. Supply this or 'oldPassword'. |