How are local accounts created on Nano Server

How are local accounts created on Nano Server

Q. How do I create local accounts in Nano Server?

A. To create local accounts on a Nano Server instance once you have a session on the box you can use one of two methods

The first is to leverage net.exe, e.g.

net user <username> <password> /add
net localgroup administrators <username> /add

Or leverage the new PowerShell local group module in PowerShell 5.0.

$securePassword = ConvertTo-SecureString "Pa55word" -AsPlainText -Force
New-LocalUser -Name "johnloc" -Password $securePassword -FullName "John Savill" -Description "John Savill Local Account"
Add-LocalGroupMember -Group "Administrators" -Member "johnloc"

You can also leverage Server Management Tools.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish