Created
July 9, 2019 21:23
-
-
Save zsoumya/6ee42a2cb76d28fad4d615b850aa095b to your computer and use it in GitHub Desktop.
Change Local User's Password
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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