How to use the Net User command to manage user accounts from CMD

How to use the Net User command to manage user accounts from CMD
Photo by Tadas Sar / Unsplash

If you are a Windows user, you may have come across the need to manage user accounts from the Command Prompt (CMD). In this article, we will show you how to use the Net User command to add, modify, and view user accounts from CMD.

To add a new local user account, we can use the following command:

net user username password /ADD

For example, if you want to add a new local user account with the username “Tom” and the password “NewPassword2019!”, the command would be:

net user Tom NewPassword2019! /ADD

Additionally, you can add the full name of the new user while creating it. Here’s how you can do it:

net user username password /ADD /FULLNAME:”User_Fullname”

For instance, if you want to add a new local user account with the username “Tom” and the password “NewPassword2019!”, and the full name “Tom Menezes”, the command would be:

net user Tom NewPassword2019! /ADD /FULLNAME:”Tom Menezes”

If you prefer to hide the password while adding the new user account, you can use the following command:

C:>net user /add Tom * Type a password for the user: Retype the password to confirm:

Modifying User Accounts

With the Net User command, you can also modify user accounts. Here are a few examples of how you can do it.

To prevent users from changing their password, you can use the following command:

Net user username /Passwordchg:No

To allow users to change their password, use the following command:

Net user username /Passwordchg:Yes

To set the password to never expire, you can use the WMIC command:

WMIC USERACCOUNT WHERE Name=’username’ SET PasswordExpires=FALSE

Viewing User Account Properties

To see the user account properties, use the following command:

Net user username

Conclusion

The Net User command is a useful tool for managing user accounts from the Command Prompt (CMD) in Windows. I hope this article has provided you with the information you need to get started using the Net User command. If you have any questions or need further assistance, please let me know on the comments.