GUI Automation using Pyautogui, Python
PYAUTOGUI is an automation module provided by Python for controlling keyboard and mouse functions via program. This module...
This guide will show you how to enable Remote Desktop Protocol (RDP) service on Windows Server 2019. RDP is a proprietary protocol developed by Microsoft for connecting to another computer with a graphical interface over a network connection.
An RDP client software is used on the local computer for this remote connection. The remote server is required to run the RDP server. The default setting of RPD in Windows server 2019 is to disable external remote desktop access. But this can easily be turned on.
RDP service can be enabled on Windows Server 2019 from the PowerShell or through the Server console interface.
Allowing Remote Desktop Service on Windows Server 2019 is faster on PowerShell that the GUI procedure. For this setting, we will use
Set-ItemPropery cmdlet to change Registry flag setting.
Launch PowerShell session as Administrator.
Then execute the command below.
Set-ItemProperty -Path 'HKLM:SystemCurrentControlSetControlTerminal Server' -name "fDenyTSConnections" -value 0
The Windows firewall doesn’t allow remote connections for RDP. We need to configure the firewall to allow for RDP remote connections.
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
To disable RDP, run:
Set-ItemProperty -Path 'HKLM:SystemCurrentControlSetControlTerminal Server' -name "fDenyTSConnections" -value 1
If you’re not more of a terminal person. you can as well enable the RDP service from the Server GUI. Open Server Manager from the Start menu.
Click on the “Local server” on the left section.
Click on the “Remote Desktop” disable button.
On the next properties setting window, select “Allow remote connections to this Computer“
Agree to Remote Desktop firewall exception warning and add users to allow by clicking on “Select Users“.
Enter Username and click Check names. Once you confirm the username, click OK to save.
The selected users should be shown on the next screen.
You’re now ready to connect to your Windows server on port
3389 with your favorite RDP client. I use Remmina.
Other Windows Server 2019 articles available include: