The Net User tool allows you to add or alter user accounts and display their information on a Windows 11/10 computer with the help of your device’s command-line utility. In this post, we will learn how you can use the Net User command for administration tasks.
How to use Net User command
You can use the net user
command to create and modify user accounts on computers. When you use this command without command-line switches, the user accounts for the computer are listed. The user account information is stored in the user accounts database. This command works only on servers.
To run the net user command tool, using the WinX menu, open a Command Prompt, type net user
, and hit Enter. This will show you the user accounts on the computer. Thus, when you use net user
without parameters, it displays a list of the user accounts on the computer.
The syntax for its usage is:
net user [<UserName> {<Password> | *} [<Options>]] [/domain] net user [<UserName> {<Password> | *} /add [<Options>] [/domain]] net user [<UserName> [/delete] [/domain]]
Using net user
with the appropriate parameters allows you to carry out several functions. You can use the following parameters with the net user command:
- username is the name of the user account you want to add, delete, modify, or view.
- password will assign or change a password for the user’s account.
- * will produce a prompt for the password.
- /domain performs the operation on the primary domain controller of the current domain on computers running Windows NT Workstation which are members of a Windows NT Server domain.
- /add will add a user account to the user accounts database.
- /delete will delete a user account from the user accounts database.
Related: How to use Net Use command in Windows.
Net user Change Password
As an example let us say you want to change the password of a user. To change a user’s password, log on as an administrator, open an elevated command prompt type the following and press Enter:
net user user_name * /domain
You will be asked to type a password for the user. Type the new password and later again retype the password to confirm. The password will now be changed.
You could also use the following command. But in this case, you will not be prompted. The password will be directly changed right away:
net user user_name new_password
Amongst many such things, you can also use net user to:
For a detailed read, visit TechNet.
How to access administrator account in Windows 11 cmd?
With the help of the Net User command, you will be able to access administrator accounts on your Windows 11 computer. To get started, open Run, type ‘cmd’, hit Ctrl + Shift + Enter, and then execute Net User. If you want to know more about this command, check out the aforementioned guide.
Read: Check if your User Account has Admin rights
How to run cmd with administrator privileges in Windows 11?
To run the Command Prompt with administrator privilege in Windows 11, you can search out Command Prompt from the Start Menu, right-click on the available option, and select Run as administrator. You will get a UAC prompt, where you have to click on Yes. This will launch Command Prompt in the elevated mode with administrative privileges.
Also Read: Fix Can’t run Command Prompt as administrator.
/expire:never not working.
how we can change administrator password in windows 8 through CMD line??
Have you tried the command with windows 7? It work on 8 for me.
/expire:never is for the account, not the password. Use “wmic useraccount where “Name=”” set PasswordExpires=False” instead!
I am currently the Administrator for about 300 Windows 7 PCs all over the country. I want to know if there’s a way to find out what the passwords are for all the user accounts when I am logged in as “Administrator” via SSH – it is the only option I have for logging on remotely, so I need a Command Line command that would do this. Is that possible?
Not working on windows 7
Nope. You can only change the password, not see it.
It works. At least for me.
I have disabled the system administrator user account from another user account .. now I cannot access the administrator account .. and when I logout the administrator account is disappeared ..
I tried to go to command prompt and do following:
c:windowssystem32net user administrator active:yes
but it did not work .. my system administrator is disabled and cannot be accessed ..
Appreciate if you could guide me on how to re-enable system administrator account ..
Thanks,
AMB
try /active:yes
JAMES LACONIA DAVIS BADGE# 82 FR 32345 0037 SSN# 446-92-8829 I WANT EVERY SITELLITE SATELLITE TO CREATE ME A LACONIA ETERNAL WORLDWIDE WEBSITE NOW FIX IT..
How can the administrator reset a user PIN in windows 10
Reset password then add new PIN