I recently had a Server 2016 which I could not RDP to

Written by

in

I knew that everything was set right but first a bit of debugging. Luckily i had SSH access:

First a good old fashioned hard reboot:

shutdown /r /f /t 0

Then some tests:

Check if the RDP Port (3389) is Listening:

To verify if the system network layer is actively hosting the standard RDP port, query your active network statistics:
cmd
netstat -ano | findstr “3389”

look for “LISTENING” on the port

  1. Check the Windows RDP Service Status

If you want to know if the underlying system service—TermService (Remote Desktop Services)—is running, use the service controller utility:
cmd
sc query TermService
Use code with caution.

  • What to look for: Look at the STATE line in the returned text. It should say RUNNING.
  1. Check if RDP is Enabled in the Registry

Sometimes the service is running, but the Windows property itself is turned off. You can read the registry configuration directly from the command line:
cmd
reg query “HKLM\System\CurrentControlSet\Control\Terminal Server” /v fDenyTSConnections
Use code with caution.

  • What to look for:
    • 0x0 means RDP is Enabled (connections are allowed).
    • 0x1 means RDP is Disabled (connections are denied).

When all of that failed this fixed it for me. I actually later had access at the console but this can also be done via command prompt in SSH:

If the issue persists, you can try reinstalling the Remote Desktop Services role. To do this, follow these steps:

Open Server Manager.
Click on Add Roles and Features.
Click Next until you reach the Server Roles page.
Select Remote Desktop Services and click Next.
Follow the prompts to complete the installation.

just tick the first box in options.

or via commandline:

Install-WindowsFeature -Name Remote-Desktop-Services, RDS-RD-Server, RDS-Licensing, RDS-Connection-Broker, RDS-Web-Access -IncludeManagementTools -Restart

All of the commandline above assumes you have the shell opened as administrator account.

Comments

Leave a Reply