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.
-
-
-
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