Created
March 23, 2020 06:56
-
-
Save kelsotodd/8808df2b1f2e923363b06dd4cb0b92d8 to your computer and use it in GitHub Desktop.
Add an administrator user using PowerShell
This file contains 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 -AsSecureString | |
New-LocalUser "sysadmin" -Password $Password -FullName "sysadmin" -Description "System Administrator" | |
Add-LocalGroupMember -Group "Administrators" -Member "sysadmin" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment