1. Home
  2. Windows Tips
  3. Net user command

How to use Net User command on Windows 10

Windows is a GUI based OS. Users get an easy-to-use interface for complex tasks like creating a new user and setting up permissions for it, among other things. Many complex tasks are done with a few clicks but many of them can be done from the command line.

Net User command

Windows 10 has plenty of command line tools; some tools like the ping tool do not have a UI and can only be used from the command line. The Diskpart tool is another great example of a command line tool but it has a GUI counterpart app i.e. the Disk Management utility.

Net User is a command line tool on Windows 10 that allows users to manage user accounts on the system. The tool supports all sorts of commands and switches that can be added on top of the main command to modify it.

The tool can be used to;

  • Create a new user
  • Delete an existing user
  • Modify a user
  • Change the permissions for a user
  • Unlock the super administrator
  • Set an expiry date for the account
  • Force a user to change their password when they sign in

The list is fairly long of what you can use the tool for.

Use Net User commands

To use the Net User utility, you must know which commands you will use and what those commands do. To get started;

  1. Open Command Prompt with admin rights.
  2. Enter net user and tap Enter
  3. This command will return every single user that is configured on the system.
  4. You can modify the command with switches to perform other operations.
  5. View information for user
Net user [username]

Example

Net user fatiw

Create new user

Use this command to create a new user where you have to replace username and password with the username for the new user and the password that you want to set for them. The square brackets can go, they’re not part of the syntax.

net user [username] [password]

Delete a user

The above command can be modified to delete a user.

net user [username] /delete

Net user commands and switches

The Net User utility has a large number of commands and switches that it supports. You can read the full list, and what they do on official documentation released by Microsoft here

To use them, follow this general syntax:

net user [<UserName> {<Password> | *} [<Options>]] [/domain]

net user [<UserName> {<Password> | *} /add [<Options>] [/domain]]

net user [<UserName> [/delete] [/domain]]

The square brackets are not part of the syntax and neither are the greater than and less than symbols however the asterisk, and the slash are part of it and should not be removed.

Conclusion

The Net User utility is best used to unlock the super admin user, or to hide it. Most users know that the GUI is a much easier way to create a user account or modify it. Some operations e.g., expiring a user or forcing a user to change their password may be easier to manage with this tool. Regardless, you should be careful with it since you may end up deleting a user and their files.