How to Add Users from CMD: 8 Steps
Introduction:
Adding users to a Windows system from the Command Prompt (CMD) can be a quick and efficient method, especially for administrators in charge of multiple machines. Here, we provide an easy-to-follow guide with eight steps on how to add users to your Windows system using CMD.
Step 1: Open the Command Prompt
To begin, click on the Start button and type “cmd” in the search bar. Right-click on the “Command Prompt” app and select “Run as administrator.” This will grant you elevated privileges necessary for certain commands.
Step 2: Enable Built-in Administrator Account
Enter the following command in the Command Prompt window:
net user administrator /active:yes
This will enable the built-in Administrator account if it is not already active.
Step 3: Create a New User Account
To create a new user account, use this command structure:
net user [username] [password] /add
Replace “[username]” with your desired username and “[password]” with your desired password. The “/add” switch will let the system know that you want to add a user.
Step 4: Specify User Groups
To specify which group the new user should belong to, enter this command:
net localgroup [group] [username] /add
Replace “[group]” with the desired group name (e.g., Administrators) and “[username]” with the username created in Step 3. This command adds your new user to the specified group.
Step 5: Set Password Expiration
To set an expiration date for the user’s password or set it to never expire, use these commands:
– To set an expiration date:
“net accounts /maxpwage:[days]”
Replace “[days]” with the number of days before password expiration.
– To set password never expires:
“net accounts /maxpwage:unlimited”
Step 6: Set Account Expiration
To set an expiration date for the user’s account or make it never expire, use these commands:
– To set an expiration date:
“net user [username] /expires:[expiry_date]”
Replace “[expiry_date]” with the date in MM/DD/YYYY format.
– To set account never expires:
“net user [username] /expires:never”
Step 7: Add User to a Domain
If you want to add your new user to a domain, follow this command structure:
net user [username] [password] /add /domain
Replace “[username]” and “[password]” as in Step 3. The “/domain” switch indicates that the user should be added to the specified domain.
Step 8: Close Command Prompt
After completing the necessary steps, type “exit” in the Command Prompt window and press Enter to close it.
Conclusion:
Adding users from CMD is a powerful tool for Windows administrators, allowing them to manage multiple machines efficiently. By following these eight simple steps, you can create desired user accounts with appropriate settings and groups easily using the Command Prompt.