How would I go about making an Administrator account (read not limited) from the command line in Windows? I have seen commands to the effect of:


However it is unclear if an account created in this way would be an admin account or a limited account.


You are on the right track - It takes two CMD line options to do this

First -

net user /add [username] [password]

This creates the user account.

net localgroup administrators [username] /add

This adds the user to the Local Administrators Group

You have to execute both commands with elevated permissions (an administrative CMD prompt)

  • 10
    If your windows is not in English, you will have to translate "administrators" to your local language. You can type "net localgroup" to check the list of groups and see how it is called on your computer. – personne3000 Jun 22 '14 at 9:53
  • 1
    And what if you want to set "Password never expires" flag for the currently created user? How could you do that? – Saeed Neamati Aug 12 '14 at 7:34
  • 2
    Switches for net user are here: support.microsoft.com/kb/251394 – user36350 Dec 26 '14 at 17:35
  • @personne3000 for example: net localgroup | find /i "admin" (for latin alphabet) – Matthieu Oct 23 '19 at 15:55
  • @Matthieu ok you use "find" and how you use it to set... complete the code... – Francisco Núñez Apr 7 '20 at 20:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.