Password reset windows powershell

From UVOO Tech Wiki
Jump to navigation Jump to search

Local user

$password = Read-Host -AsSecureString
$UserAccount = Get-LocalUser -Name "User02"
$UserAccount | Set-LocalUser -Password $password

$password = (Read-Host -Prompt "Provide New Password" -AsSecureString)
Set-ADAccountPassword -Identity foo -Password $password

Refs