Skip to content

Instantly share code, notes, and snippets.

@kelsotodd
Created March 23, 2020 06:56
Show Gist options
  • Save kelsotodd/8808df2b1f2e923363b06dd4cb0b92d8 to your computer and use it in GitHub Desktop.
Save kelsotodd/8808df2b1f2e923363b06dd4cb0b92d8 to your computer and use it in GitHub Desktop.
Add an administrator user using PowerShell
$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