Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

net user USERNAME PASSWORD /add

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

share|improve this question

1 Answer 1

up vote 16 down vote accepted

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)

share|improve this answer
    
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 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 at 7:34

protected by Community Aug 15 at 11:40

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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