Add or Delete Users Account with Command Line in Windows

email

You can create user accounts separate for each person that will be using your computer. This will allow each Windows user to have their own settings, documents folder, visual style, wallpaper and so on. So separate account for every computer user is much better idea and you can do this simple from command line. To create a new user in windows or to delete a user just follow the steps below.

This guide is tested in Windows XP, Vista and Windows 7.

To add a new user account

Step-1

Press Windows Key + R then type in “cmd” (without quotes) and hit enter, this will run command line

Step-2

In command line type this command net user UserName Password /add

Where:
UserName = Name of the user account
Password = Password of the user account

add-new-widnows-account-using-cmd

See the new user account has been added (Start Menu > Control Panel > Users)

add-new-widnows-account-using-cmd-2

To delete user account

Step-1

Press Windows Key + R then type in “cmd” (without quotes) and hit enter, this will run command line

Step-2

In command line type this command net user UserName /del

Where:
UserName = Name of the user account that you want to delete

remove-widnows-account-using-cmd-1

For more stuff like this you can: Subscribe to RSS Feed or Get Updates Via Email or Follow us on Twitter

Share/Save this Post

Comments:

  1. Nono 1 October 2009 at 3:31 pm #

    nice Windows tips

  2. Asim 1 October 2009 at 4:00 pm #

    I try this on Windows Vista thx for these Windows OS tutorials and keep t up

  3. rabab 1 October 2009 at 5:56 pm #

    thanks for sharing this knowledge of Windows OS

  4. James Amon 16 October 2009 at 5:48 am #

    its so simple to use cmd

  5. Nami 18 October 2009 at 6:28 pm #

    thanks for sharing this command line method to add/del user account

  6. SPOIBINIA 21 October 2009 at 5:42 pm #

    Thanks for helping me in deleting user accounts

  7. Natasha 25 October 2009 at 3:25 am #

    thanks for sharing this tip to add new users through command line on windows platform.

  8. Karolin 25 October 2009 at 2:30 pm #

    Ya it works in Windows 7

  9. Ahmet Zeynep 26 October 2009 at 10:50 am #

    easy to add/del new user throgh command line

  10. wastn 30 October 2009 at 11:03 am #

    Simply simpe to create user, thanks.

  11. diiu 31 October 2009 at 1:23 am #

    Thanks for command

  12. Paul Johannesson 4 November 2009 at 6:35 am #

    I am surprised with your tips keep it up

  13. Duvbo 5 November 2009 at 7:51 pm #

    this is really a fun for me as I am not an expert user

  14. Angela Westin 15 November 2009 at 1:26 pm #

    I try this to add new user through command line, it works for me

  15. Niya 27 November 2009 at 3:32 pm #

    Very simple way to create user

  16. Candi 11 January 2010 at 10:08 am #

    Will this remove the profile of the user as well?

  17. paan 16 June 2010 at 7:00 am #

    i cannot delete my user password:
    this msg appear

    c:\net user username /del
    system error 5 has occurred.

    Acces is denied.

    • trickYguY 16 June 2010 at 7:18 am #

      You must log out from user account that you want to delete and log in to another account that must have Administrator privileges, then use this command to remove Windows account.

      • love 15 August 2010 at 3:23 pm #

        not able to delete
        cmd showing error

    • Like_A_Bouse 23 December 2011 at 11:17 am #

      There are many ways to fix this problem, using batch windows, and connecting them to systems32, but the easiest is to make sure you are on an account with Administrator privileges, or that you know the password of an account with those privileges. First, go to Start>All Programs>Accessories>Right Click on “Command Prompt”>Run as Administrator, and one of two things will happen. One, if you are on an account with admin privileges, you will go straight to Command prompt, but it will say “windows/systems32> instead. Or two, you will be prompted for a password of an administrator account, and then the same will happen. Your Welcome, email me or reply with any questions.

  18. Junker 13 October 2010 at 6:40 am #

    Okay, I know you probably posted this a while ago. i tried it using Windows 7, adding an account.

    I only have 1 user account, which has administrator access but for some reason can’t add secondary accounts using cmd? I can using control panel.

    comes up as above…
    System Error 5
    Access Denied.

    • trickYguY 13 October 2010 at 6:51 am #

      Run command line as an administrator.
      Type cmd in Start button’s Search box then in the search results right click on cmd.exe then select “Run as administrator”.
      Then execute commands to add or remove user accounts.

      See also: http://support.microsoft.com/kb/555644

  19. tegaressentials 28 October 2010 at 6:19 am #

    Nice and great command to delete user to recovery Windows.
    I have one question: “How to delete user is the username has space. NET USER Tegar Essentls /DELETE will not work.”.
    Thanks.

    • trickYguY 28 October 2010 at 11:53 pm #

      If username contains spaces in it then put double quotes around username while running delete command.
      e.g.

      net user “K Jim” /delete

  20. Rames 19 November 2010 at 6:57 pm #

    Thats cool… but the command creates a Limited Account..
    How can i create an account with “computer administrator”

    • Like_A_Bouse 23 December 2011 at 11:23 am #

      Simple! First of all, make sure you ran it as an administrator by right clicking on it and then left clicking on “Run as Administrator” Then, type ((Without quotes))
      “net localgroup Administrators USERNAME /add”
      and obviously, hit enter. To see a list of localgroups on your system, type
      “net localgroup” most of them are just jibberish, random numbers and letters, just paty attention to Guests, Users, and Administrators. Your welcome, please email me with any comments, questions, or concerns, or just reply to this. If it does not show my email it is “ghs098@gmail.com” Thank you for your time.

  21. robbybobby 23 November 2010 at 6:11 am #

    hi does anyone know how to change a users account name on windows 7? the pc connects to windows server 2003 and i dont know how to enter the machine locally to change this. can this be edited it dos?

  22. Nora 15 May 2011 at 1:47 pm #

    when i forget password user account what can do?

    what can i create user account without log in windows?
    what cant i use CMD when i don’t log in window7?

  23. Lakshmi 9 November 2011 at 4:10 pm #

    This will delete only the user and it is not deleting the user profile. Can you provide me the command for deleting the user profile?

Trackbacks/Pingbacks

  1. uberVU - social comments

Leave a Reply