Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to change a user from normal user to administrator in command-line. Is this possible? What command should I use?

share|improve this question
add comment

1 Answer

Net group is the command your seeking.

add user to local administrator group:

net group administrators /add adminguy
share|improve this answer
    
I presume you'll be prompted for the username/password of an actual admin before it succeeds? –  David Mackintosh Oct 18 '10 at 7:38
    
No it wont prompt you for username/password. It checks the userlevel of the cmd window your typing it in. So in windows 7 you might have to right-click "command" and choose run-as administrator. Or put it in a bat script and run the bat script as administrator. –  Espennilsen Oct 18 '10 at 9:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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