Share via

Command to enable Remote Desktop using CMD

Vikas Vijay Bhadvalkar 25 Reputation points
Jun 28, 2023, 8:38 PM

Command to enable Remote Desktop using CMD batch

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,726 questions
{count} votes

Accepted answer
  1. Anonymous
    Jun 28, 2023, 8:52 PM

    You'll need to start Remote Desktop Services (TermService) service, then add the firewall rule to allow inbound connections on port 3389, and finally add the users to the Remote Desktop Users

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Matthew Bechtol 481 Reputation points
    Jun 28, 2023, 8:48 PM
    :: Enable remote access.
    
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
    
    :: allow through firewall.
    
    netsh advfirewall firewall set rule group="remote desktop" new enable=Yes
    
    4 people found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.