Create admin user from command line

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 if an account created in this way would be an admin account or a limited account.

1 Answer

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)

6

You Might Also Like