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


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.

  • 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
  • You may need to set Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server:fDenyTSConnections to 0 in addition if RDP isn't enabled on the machine – Rahul Misra Oct 29 '20 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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