Skip to content

Instantly share code, notes, and snippets.

@zsoumya
Created July 9, 2019 21:23
Show Gist options
  • Save zsoumya/6ee42a2cb76d28fad4d615b850aa095b to your computer and use it in GitHub Desktop.
Save zsoumya/6ee42a2cb76d28fad4d615b850aa095b to your computer and use it in GitHub Desktop.
Change Local User's Password
$password = Read-Host "Enter the new password" -AsSecureString
Get-LocalUser -Name LocalUser | Set-LocalUser -Password $password
runas /user:LocalUser cmd.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment