logo
Windows Server Common Net User Command for Windows Server 2012 (R2)

Net User Command for Windows Server 2012 (R2)

By Sophia | Last Updated

The net user command is command usually used to add, remove, enable or disable user account and reset Windows password on computer, which applies to Windows server 2012(R2)/ 2008(R2)/2003(R2)/2000 and Windows client operational systems.

Basic net command prompt structure is like the following. All of the specific commands are produced based on this command structure.


net user [username [password | *] [/add] [options]] [/domain]] [username [/delete] [/domain]] [/help] [/?]

  • username: User account name you have set on your server or you are preparing to create.
  • password: New password set for username.
  • *: You can use this option in place of password to force username original password to be removed, or don't set any password for created new user account.
  • /add: Use the option to add new user account.
  • /domain: This option could set user account on domain controller instead of local computer.
  • /delete: The option could help you to delete user account ever set on your computer.
  • options: There are many options you could set for username according to your demand.

For example, /active: {yes | no} is used to activate or deactivate the specified user account. And the default setting is to activate user account.

Now based on net user command introduction above, make some changes on command for server 2012 (R2) domain controller in purpose of:

  1. Create/add domain user
  2. Change/reset a domain user password
  3. Delete/remove domain user
  4. Disable/enable a domain user

1. Create or add domain User with net user comand

net user [username [password|*] /add / domain
Example: net user iSunshare abc@12345 /add /domain

create domain user in server 2012 r2

If you have interest in other ways to create user account in Windows server 2012 (R2), please go to read this:
How to create a local administrator user account on Windows server 2012 (R2)

2. Change or reset domain user password with command

net user [username [password|*] /domain
Example: net user iSunshare Abc12345 /domain

You could see it in above picture. This way is usually used to reset Windows server domain password when you have admin privileges to access computer or server 2012 (R2).

3. Delete/remove domain user with net user command

net user [username] /delete /domain
Example: net user iSunshare /delete /domain

delete windows server 2012 r2 domain user

4. Disable/enable a domain user with following command

deactive and active server domain user

  • Disable domain user: net user [username] /active: no  /domain
    Example: net user iSunshare /active: no /domain
  • Enable a domain user: net user [username] /activate: yes /domain
    Example: net user iSunshare /active: yes /domain

Before you disable domain user, when you type command “net user iSunshare”, you would see this:

before deactive server domain user

After you run command “net user iSunshare /active: no /domain”, and hen type “net user iSunshare” and press Enter, you would see this user is disabled.

after deactive domain user account

Above introduced commands are usually used in computer, and easy for even computer novice. But if you want to try other more complicated command, powerful technology is needed considering computer safety.

Related Articles: