Create a Local User Account with New-LocalUser
Add a new local Windows account (child, guest, shared machine) from PowerShell instead of the Settings wizard.
01Command
$ $pw = Read-Host "Password" -AsSecureString
New-LocalUser -Name "kid" -Password $pw -FullName "Kid Account" -AccountNeverExpires02What it does
New accounts created this way land as standard (non-admin) users, which is exactly what you want for kids' profiles, a kiosk machine, or a houseguest. The -Password parameter demands a SecureString, so the two-step Read-Host pattern keeps the password out of shell history and logs. Add -AccountNeverExpires so the password does not expire out of the blue, and use Add-LocalGroupMember -Group "Administrators" only if the person genuinely needs admin rights. The account is fully removable with Remove-LocalUser when no longer needed.
03Risk
04Undo
$ Remove-LocalUser -Name "kid"05Sources
- New-LocalUserEvidence: Documents New-LocalUser with -Name, -Password (SecureString), -FullName, and -AccountNeverExpires parameters.
Last verified: 2026-09-18 · Category: System & Settings
06Related solutions
Search inside text files and logs with regex, returning file, line number and match.
Create or update a .zip from any files or folder contents straight from PowerShell.
A built-in PowerShell one-liner that answers 'is port 5432/3389/443 actually open through this network?' — no telnet client needed.