

Test-NetConnection -ComputerName wksde133 -CommonTCPPort RDPĮnable Remote Desktop Connections on Windows Server 2022/2019 To make sure that the RDP port is open on the computer, use the Test-NetConnection cmdlet: If you want to add a user to the local RDP access group, run this command: Add-LocalGroupMember -Group "Remote Desktop Users" -Member a.williams.To do it, enable the following firewall rule: Enable-NetFirewallRule -DisplayGroup "Remote Desktop" Allow RDP connections to the computer in Windows Defender Firewall.In order to disable RDP, change the fDenyTSConnections value to 1. Make sure that the Remote Desktop rule is enabled for the Private profile (home or corporate network) and for the Public one (public networks) if needed.

Open a list of default Windows Firewall rules by clicking the Allow an app or feature through Windows Firewall in the left column. Open the Control Panel and select Windows Defender Firewall. By default, TCP port 3389 is used for RDP connections, and the latest Windows builds also use UDP 3389 (see the article about the case when a black screen appears instead of the desktop during an RDP connection).

If Windows Defender Firewall is enabled on a computer, make sure that it allows incoming RDP connections. Here you can enable Network Level Authentication for your RDP connection (recommended).
