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.
0 comments
Hide comments