To grant a user Remote Desktop access, you must add them to the Remote Desktop Users group on the target machine. This guide shows how to do it using the net user
and net localgroup
commands in the Command Prompt.
Step 1: Open Command Prompt as Administrator
First, you’ll need to open a Command Prompt with administrative privileges. Search for “cmd” in the Start menu, right-click it, and select “Run as administrator.”
Step 2: Add a New User (Optional)
If the user account doesn’t exist on the target machine, you can create a new one using the following command:
net user username password /add
- Replace
username
with the desired username. - Replace
password
with the desired password.
Example:
net user JohnDoe MyPassword123 /add
Step 3: Add the User to the Remote Desktop Users Group Now, to give this user Remote Desktop access, add them to the Remote Desktop Users group with this command:
net localgroup "Remote Desktop Users" username /add
- Replace
username
with the actual username you want to add.
Example:
net localgroup "Remote Desktop Users" JohnDoe /add
Done!
That’s it! The user is now part of the Remote Desktop Users group and can access the machine via Remote Desktop. This approach simplifies managing remote access via the command line.