Use this when RDP connections fail or must be secured.
RDP
RDP (Remote Desktop Protocol) carries a Windows desktop session over TCP and UDP 3389. Protect it with Network Level Authentication, MFA or a gateway, and never expose it directly to the internet.
1. Test-NetConnection <host> -Port 3389.
2. Certificate and NLA errors on the client?
3. Event logs TerminalServices-RemoteConnectionManager/LocalSessionManager.
4. Licensing (RDS) if many users.
5. Use RD Gateway for internet access.
TCP 3389 → TLS → CredSSP/NLA → session
Context & applicabilityCommon mistakes · platform/version boundaries
- RDP exposed on port 3389 or a "hidden" port to the internet.
- No MFA for RDP via RD Gateway.
- Restricted Admin or Remote Credential Guard not used for admin sessions.
- Old RDP clients without CredSSP updates.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checks Verify boundary
Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name UserAuthentication
qwinsta /server:srv01
UserAuthentication=1 means NLA is required. Logons appear as event 4624 type 10 in the Security log and in Microsoft-Windows-TerminalServices-LocalSessionManager/Operational.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Network Level Authentication authenticates before the session starts.
- Use MFA or an RD Gateway; never expose 3389 directly.
- RDP uses TCP and UDP 3389.
Test-NetConnection <host> -Port 3389— RDP portGet-ItemProperty 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name fDenyTSConnections— RDP enabled (0)Test-WSMan <host>— WinRMGet-Service sshd— OpenSSH server
ReferenceWhy it matters1 section · depth on demand
Securing RDP
- Network Level Authentication (NLA) on.
- Access only through VPN/RD Gateway; restrict by firewall to admin networks.
- MFA (RD Gateway + NPS extension, Duo, Entra).
- Restricted Admin or Remote Credential Guard for admins.
- Account lockout and monitoring of 4625/4624 type 10 events.
Enable: Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\Terminal Server' fDenyTSConnections 0 and Enable-NetFirewallRule -DisplayGroup "Remote Desktop".
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
RDP security and performance settings:
| Area | Recommendation |
|---|---|
| Authentication | NLA required; Restricted Admin or Remote Credential Guard for admins |
| Encryption | TLS with a trusted certificate (not self-signed) |
| Exposure | RD Gateway / VPN with MFA, never 3389 to the internet |
| Lockout | Account lockout policy, monitoring of 4625 events |
| Performance | UDP transport enabled, adjust display/redirections |
mstsc /v:srv01 /restrictedadmin
mstsc /v:srv01 /remoteGuard
qwinsta /server:srv01; logoff 2 /server:srv01
Event IDs: 4624 Logon Type 10 (RemoteInteractive), TerminalServices-LocalSessionManager/Operational 21/24/25.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Remote Access → RDP. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/ · confidence 94%