Net User Command To Manage User Accounts

How to use Net User command to Manage User Accounts

 

To Add a User Account from Command Line:

net user USERNAME PASSWORD /ADD

 

To Add User to Local Administrators Group

net localgroup Administrators USERNAME /add

 

To Delete User using Command Line

net user USERNAME /delete

 

To add a new user account to the domain:

net user username password /ADD /DOMAIN

 

Note that the command does not include the name of the domain, it automatically adds to the domain the computer belongs to.

The most important parameters of the Net User command are:

<username> Specify the username to the account you want to perform the action on
<password>  Set or change the password for the specified user account. Use * to get a prompt for the password.
/domain        Used for managing domain accounts
/add             Create a new user account
/delete         Delete a user account
/active         Enable or disable the user account. Options are yes or no.
/expire        Set the date when the account expires
/time          Specifies the times that a user is allowed to log in
/homedir     Set the home directory path of the user account.