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.

Is it possible to add a user to the allowed rdp accounts from the commandline?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Sure, you can use the NET command:

NET LOCALGROUP "Remote Desktop Users" domain\jscott /ADD

This would add the domain user domian\jscott to the local group Remote Desktop Users. If you'd like to add a non-domain user, simply leave off the domain prefix:

NET LOCALGROUP "Remote Desktop Users" keyoke /ADD

This would add the local user keyoke to the local group Remote Desktop Users.

share|improve this answer
    
great if machine is not part of domain would I just use COMPUTER-NAME? –  keyoke Mar 7 '12 at 11:55
    
See edits for adding local user. –  jscott Mar 7 '12 at 11:59
    
ah crap... dont have sufficient permissions and cant remember my admin password –  keyoke Mar 7 '12 at 12:02
    
@keyoke Have a quick search of related questions, it's not much work to reset the local administrator's password on Windows. –  jscott Mar 8 '12 at 0:19

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.