The net user and group commands are very powerful tools for managing local and domain users and groups.
In this post, I will show you how to use the net user
command locally and on a domain to create a user account, reset a user account password, and view general info about a user account. I will also show you how to use the net group
and net localgroup
commands to manage local groups and domain groups, and how to view group members.
Net User
Create User Account
- Open CMD as admin or as an account that can create a domain user account.
New Local User
- Enter the following command to create a new local user account and replace USERNAME_HERE and PASSWORD_HERE with the username and password you would like to use
net user USERNAME_HERE PASSWORD_HERE /add
For example, if I want to make a new local account named NewUser with a password of NewP@ssword1, the command will be net user NewUser NewP@ssword1 /add
New Domain User
- Enter the following command to create a new domain user account and replace USERNAME_HERE and PASSWORD_HERE with the username and password you would like to use
net user USERNAME_HERE PASSWORD_HERE /add /domain
For example, if I want to make a new domain user account named NewUser1 with a password of NewP@ssword1, the command will be net user NewUser1 NewP@ssword1 /add /domain
Change User Password
- Open CMD as admin or as an account that can change a domain user password.
Change Local User Password
- Enter the following command to change a local user account’s password and replace USERNAME_HERE and PASSWORD_HERE with the username and password you would like to use
net user USERNAME_HERE PASSWORD_HERE
For example, if I want to change the password of the local account named NewUser to the password of NewP@ssword2, the command will be net user NewUser NewP@ssword2
Change Domain User Password
- Enter the following command to change a domain user account’s password and replace USERNAME_HERE and PASSWORD_HERE with the username and password you would like to use
net user USERNAME_HERE PASSWORD_HERE /domain
For example, if I want to change the password of a domain account named NewUser1 to the password of NewP@ssword2, the command will be net user NewUser1 NewP@ssword2 /domain