Click here for Low cost website hosting!

IP Address Lookup
IP Address

Microsoft Windows Tips And Tricks!


Add Or Delete Users From The Command Prompt In Windows Xp, 2003, Vista, 7 And 8

Some times we may want to add new users or delete them from the command line instead of using the GUI. For example, if we have to add some 100 users, using a script will save a lot of time and manual effort. Windows provides net user command for this purpose. This command works with Windows XP/2003, Vista,7 and 8. Here is the way to use this command:

To start open an Administrator/elevated command prompt Window.
To see the current users on the System type in the command window:
net user and press enter
Example: To add the user David to the computer with a password of 124dfish do the following.
type net user David 124dfish /ADD and press enter.
To delete the same user or a different one do the following:
Type net user David /Delete and press enter.
Below is the actual example of the process executed in the command prompt.

Listing current users on system:

List Users From CMD Prompt

Add a user to the system:

Add User From CMD Prompt

Delete a user from the system:

Del User From CMD Prompt

Advanced uses of net user command.

To set user full name while creating the user account:
net user username password /ADD /FULLNAME:"User_Fullname"
To allow user to change password:
net user username password /ADD /PASSWORDCHG:Yes
To restrict user not to change the password:
net user username userpasswd /ADD /PASSWORDCHG:NO
To set account expiry time we can use the /EXPIRES switch. This can also be used to set that the account never expires.
net user username userpasswd /expires:mm/dd/yyyy
net user username userpasswd /expires:never

To specify if the user must have a password set or not we can use /PASSWORDREQ switch.
net user username userpasswd /passwordreq:yes or no

Thanks for visiting

Return to Index Page

Valid HTML 4.01 Transitional
Copyright 2018 CSN All Rights Reserved