tacticalrmm/scripts_wip/Win_User_Password_Reset.ps1

8 lines
293 B
PowerShell

# Set the Password-String -- defaults to THIS.IS.NOT.SECURE
$newpwd = ConvertTo-SecureString -String "THIS.IS.NOT.SECURE" -AsPlainText ?Force
# Set the correct local user you want to reset
$UserAccount = Get-LocalUser -Name "ADMINUSER"
# Set it
$UserAccount | Set-LocalUser -Password $newpwd