API Reference
Command
Reset-ADXUserPassword
Resets an Active Directory user password.
Examples
Example 1: Preview a password reset for a helpdesk user
$password = ConvertTo-SecureString 'N3wPass!2026' -AsPlainText -Force
Reset-ADXUserPassword -Identity 'marta.nowak' -Domain 'contoso.com' -NewPassword $password -ChangeAtNextLogon -WhatIf
Example 2: Reset a service account password without forcing next logon change
$password = ConvertTo-SecureString 'S3rv1ce!2026' -AsPlainText -Force
Reset-ADXUserPassword -Identity 'svc_sql_ops' -Domain 'contoso.com' -NewPassword $password
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Reset-ADXUserPassword -Identity <string> -NewPassword <SecureString> [-ChangeAtNextLogon] [-Domain <string>] [<CommonParameters>]#Parameters
- Identity string
- Gets or sets user identity (sAMAccountName, UPN, DN, mail, or name).
- NewPassword SecureString
- Gets or sets the new password as a secure string.
- ChangeAtNextLogon SwitchParameter
- Gets or sets whether to enforce password change at next logon.
- Domain string
- Gets or sets the optional domain DNS name.
Outputs
ADPlayground.DirectoryMutationResult