Add and remove user accounts with the command prompt

Author: Tamara Smith
Date Of Creation: 19 January 2021
Update Date: 2 July 2024
Anonim
Add and Delete User Accounts With Command Prompt in Windows
Video: Add and Delete User Accounts With Command Prompt in Windows

Content

Using the command prompt in Windows (or the terminal in OS X), you can enter system commands. While most user commands you enter in Command Prompt are easier to perform as an action (e.g. opening a folder), you can use Command Prompt to quickly create (or delete) user accounts right from your desktop. !

To step

Part 1 of 2: Opening the Command Prompt

  1. Open your PC's Start menu. Do this by clicking the Start button at the bottom left of the screen. Please note, in order to delete users, you must be logged in as an Administrator.
    • You can also click on the ⊞ Winbutton to do this.
  2. Type "Command Prompt" in the search bar of the Start menu. The link to Command Prompt should appear at the top of the search results.
    • You can also take the test ⊞ Win hold down and press X to open a shortcut menu with Command Prompt as an option.
  3. Right-click on the Command Prompt icon. A drop-down menu will appear.
  4. Click on "Run as administrator" in the drop-down menu. You cannot access the Command Prompt in Administrator mode from a guest account.
    • If you are using the shortcut menu, click on the "Command Prompt (Admin)" option. Do not use the regular Command Prompt option.
  5. Click "Yes" in the pop-up window. You can use this to open the Command Prompt as an administrator.

Part 2 of 2: Adding and removing users

  1. Click on the Command window. That way you make sure the cursor is on the Command line.
  2. Add a user account. Type net user (username) (password) / add and press ↵ Enter when you are done. This will add a new user to your account!
    • Replace the information in parentheses with an actual username and password (without the parentheses).
  3. Delete a user account. Type net user (username) / delete and press ↵ Enter when you are done. The selected user account should now be gone!
    • You will see a line of text stating "The command completed successfully" after successfully adding or removing an account.
  4. Close the Command Prompt. Now you know how to add and remove users with Command Prompt!

Tips

  • If you do not select "Run as administrator" when opening the Command Prompt, you will not be able to add or delete user accounts.

Warnings

  • Be careful when deleting a user account; once it has been removed, it cannot be recovered.