ForceChangePassword
ForceChangePassword
1st Method
PS C:\> Set-ADAccountPassword sieng.chantrea -Reset -NewPassword (Read-Host -AsSecureString -Prompt 'New-Password') -Verbose
New Password: ********
Enforce a password reset at next logon:
PS C:\> Set-ADUser -ChangePasswordAtLogon $true -Identity sieng.chantrea -Verbose
2nd Method
PS C:\> $Password = ConvertTo-SecureString "Password123" -AsPlainText -Force
PS C:\> Set-ADAccountPassword -Identity "sieng.chantrea" -Reset -NewPassword $Password
3rd Method PowerView
$NewPassword = ConvertTo-SecureString 'Password123!' -AsPlainText -Force
Set-DomainUserPassword -Identity 'sieng.chantrea' -AccountPassword $NewPassword
Last updated