How Do I Create a New User or Admin Account from Command Prompt
Setting up a PC for a new employee, rescuing a profile, or creating a clean admin account — Settings takes a dozen clicks, but CMD does it in two commands. The net user family handles creating accounts, granting admin rights, changing passwords and removing accounts.
✍️ Technical Anshu🪟 Windows 10 / 11⏱️ 3 minute task
🎥 Account commands are part of the full CMD toolkit in this video — watch every admin command demonstrated live
Offices need this constantly: a new person joins and needs an account, a standard user needs temporary admin rights, or someone leaves and their account must go. Windows Settings can do all of it, but slowly and one screen at a time. IT admins use the net user commands instead — they are instant, they work the same on every Windows PC, and they can be repeated on ten machines without thinking. Every command on this page must run in Command Prompt as Administrator (right-click Start → Terminal (Admin) or Command Prompt (Admin)); without admin rights, Windows will refuse with a "System error 5 — Access is denied" message. In the examples, the new user is called Ravi with password MyPass123 — replace both with your own values. Passwords are typed visibly in these examples, so use this method on your own or your organisation's PCs only.
Administrator: Command Prompt
C:\Windows\System32>net user
User accounts for \\DESKTOP-PC
-------------------------------------------------------------------------------
Administrator DefaultAccount Guest
Ravi WDAGUtilityAccount
The command completed successfully.
👆 First step in any account job: list who already exists on the machine (CMD window recreated with the real output format)
1
See All Accounts on the PC
Type net user and press Enter
Windows lists every local account, including built-in ones like Administrator and Guest (usually disabled)
For full detail on one account — password age, group membership, last logon — type net user Ravi
2
Create a New User Account
Type net user Ravi MyPass123 /add and press Enter
The message "The command completed successfully" confirms the account now exists
The new account is a standard user by default and gets its profile folder the first time it signs in
Administrator: Command Prompt
C:\Windows\System32>net user Ravi MyPass123 /addThe command completed successfully.
👆 One line, one new account (CMD window recreated with the real success message)
3
Make the Account an Administrator
Type net localgroup administrators Ravi /add and press Enter
Again, "The command completed successfully" means the rights are granted
To remove admin rights later: net localgroup administrators Ravi /delete
4
Change a Password or Delete the Account
Set a new password for an existing account: net user Ravi NewPass456
Delete an account that is no longer needed: net user Ravi /delete
Deleting the account does not instantly erase its files — the profile folder under C:\Users stays until an admin removes it, so copy anything important first
5
Verify Before You Hand Over the PC ⭐
Run net user Ravi and check the "Local Group Memberships" line — an admin account will show *Administrators there
Sign out and sign in once as the new user to confirm the password works
Tell the user to change the temporary password on first use
Account management is one section of the complete CMD toolkit — the full video also covers services, sharing, repair and network commands that office admins use every day.
⚠️ Honest limits: these commands manage local accounts and need an existing administrator login — they cannot recover a PC where you have forgotten the only admin password, and they do not create Microsoft accounts (those are added through Settings with the person's email). Also note the password appears on screen and in the console history here, so set a temporary one and have the user change it.
🎥 Watch the Complete CMD Toolkit
Users, services, network, repair — the full admin command set demonstrated live in one video.
Why do I get "System error 5 has occurred — Access is denied"?
The Command Prompt was not opened as Administrator. Close it and reopen with right-click on Start → Terminal (Admin) or Command Prompt (Admin), then run the command again.
Can I create an account without setting a password in the command?
Yes — replace the password with an asterisk: net user Ravi * /add. Windows will then ask you to type the password twice, and it stays hidden while you type instead of appearing on screen.
Will deleting a user account delete their documents too?
The account is removed, but its profile folder (C:\Users\username) with documents and desktop files remains on disk until an administrator deletes it manually. Always back up the user's files before removing an account.
This guide is based on the Technical Anshu CMD Toolkit video • Stuck on a step? Ask in the video comments — you will get a reply 🙏