When an RDP connection fails you can get the error: Remote Desktop can’t find the computer. In this article, we will look at how to troubleshoot and fix this common Remote Desktop Connection issue.
The problem occurs after you specify the remote RDP (RDS) host name in the built-in Remote Desktop Connection (RDC) client (mstsc.exe) and try to connect:
Remote Desktop can’t find the computer RDPHostName. This might mean that RDPHostName does not belong to the specified network. Verify the computer name and domain that you are trying to connect to.
Table of Contents
‘Remote Desktop Can’t Find the Computer’: Common Reasons
First, check that you have entered the correct remote host name/IP address in the Remote Desktop dialog. This is the most common reason why users fail to connect using RDP.
In other cases, further diagnosis and troubleshooting is required.
The most common causes for the “Remote Desktop cannot find the computer” error are:
- The client computer cannot resolve the DNS name of the RDP host;
- Network connectivity issues (including firewall restrictions);
- Incorrect Remote Desktop host configuration;
- Misconfigured Remote Desktop Gateway host (if used).
Remote Desktop Can’t Find Computer due to DNS Issues
This error can mean that there are problems with the DNS that are preventing your computer from resolving the host name that you have specified.
Possible causes for the DNS problem are:
- Incorrect DNS settings in network connection properties;
- There are incorrect entries in the hosts file on your computer;
- Your DNS servers are unreachable (the access is blocked by a firewall or the server is down);
- There is no DNS record in the DNS zone for your RDP host or the record points to the wrong IP address.
First, you need to try the following simple things:
- Try to type the Remote Desktop Computer name in the full (FQDN) and the short NetBIOS format. And check the RDP connectivity. For example:
ny-rds01 and ny-rds01.theitbros.com
- Try to connect to the RDP host by the IP address instead of the DNS name. If the RDP connection is established correctly using an IP address, this means that the problem is related to DNS;
- Clear the DNS cache entries on your computer using the command:
ipconfig/flushdns
If the simple methods above have not helped, you will need to perform a full DNS diagnostic on your computer.
Check that your DNS server can resolve the Remote Desktop host name you have specified:
Nslookup RDPHostName
Make sure that the command returns the IP address of the remote RD host:
If the nslookup command returns a “DNS request timed out” error, it means your DNS server is unreachable (offline, or blocked by firewall) or the wrong DNS server is specified in your network connection settings.
Check the preferred and alternate DNS server IP addresses specified in the network connection settings. You can list your DNS server settings with PowerShell:
Get-DnsClientServerAddress | Select-Object –ExpandProperty ServerAddresses
Hint. Learn how to configure network adapter IP settings with PowerShell.
Contact your network administrator to check that the DNS server addresses are correct if you have assigned them manually. If the DNS server settings are assigned automatically by the DHCP server, make sure they match your infrastructure. In the last case, you can refresh your IP settings using the commands:
ipconfig /release ipconfig /renew
If the Nslookup command still returns an invalid entry, open the local hosts file with the command:
Notepad C:\Windows\System32\drivers\etc\hosts
If there are no entries for your RDP server in the file, you can try to add them manually (this allows you to bypass the incorrect records returned by your DNS server). You need to add a string to a hosts file in the following format:
10.1.2.70 rdphostname.contoso.com
If the problem is solved, it means your DNS server is misconfigured. You need to check the entries on it or report the problem to your DNS administrator.
If you are a member of the DNS Admins Active Directory group, you can check the DNS records using the DNS manager MMC snap-in (dnsmgmt.msc).
Connect to a Windows Server DNS host (your domain controller), expand the DNS zone, and find the A or CNAME record of your RDP host. Make sure it has the correct IP address.
Fix Network Problems That Prevent Connection to Remote Desktop Computer
Check that there are no network problems preventing the RDP connection.
Check that the default RDP port 3389 (TCP) on the RD host server is accessible from the client using the Test-NetConnection command:
Test-NetConnection rdphostname.contoso.com -port 3389
If the command returned TcpTestSucceeded: False, it means the RDP service on the remote computer is disabled, or the connection is blocked by the firewall:
- Enable the Remote Desktop on the host;
- Check that the Windows Defender firewall on the remote host allows an incoming RDP connection. You can enable this rule the command:
Enable-NetFirewallRule -DisplayGroup “Remote Desktop”
Or you can allow Remote Desktop connection only for a specific IP address:
New-NetFirewallRule -DisplayName "AllowRDPFromSpecificHost" –RemoteAddress 192.168.10.210 -Direction Inbound -Protocol TCP –RemotePort 3389 -Action Allow
Hint. Or you can just reset Firewall settings to the default state.
- If you are using a third-party firewall and/or antivirus, try to temporarily disable them on the RDP host and see if they are preventing RD connections.
- Check whether a VPN connection is active on your computer, preventing you from connecting to the Remote Desktop host. Try to disabling (or enabling) VPN.
Check the Remote Desktop Host Settings
If nothing helps, check the settings on the remote RDP host you are trying to connect to.
Check the IP address and name (FQDN) of the remote computer with the command:
[System.Net.Dns]::GetHostByName($env:computerName)
Make sure that you are specifying the correct IP address or host name in the RDP client window.
Check that the Private or Domain network profile is enabled on the computer:
Get-NetConnectionProfile
If the NetworkCategory is set to Public, this may restrict the RDP connectivity. Change the network profile type to Private:
Set-NetConnectionProfile -InterfaceIndex 19 -NetworkCategory Private
Check that RDP access is enabled on the remote host:
-
- Run SystemPropertiesRemote
- Go to Remote tab;
- Check if the Allow remote connection to this computer option is enabled.
Check if the following services are running on the computer:
- Remote Desktop Services (TermService).
- Remote Desktop Services UserMode Port Redirector(UmRdpService).
get-service TermService,UmRdpService
If the services are not running, change their startup order and restart the computer:
sc config TeamService start = demand sc config UmRdpService start = demand Restart-Computer
Make sure the RDP service accepts connections on the default TCP port 3389:
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-TCP\' -name "PortNumber"
If this command returns that RDP is running on a non-standard port (for example, TCP:3333), you can specify the port in the Remote Desktop Connection window in the following format
rdphost.theitbros.com:3331
Now check if the RDP service is listening on port 3389:
cmd /c 'netstat -ano | find "3389"'
Also, check that the svchost.exe process of the TermService service is listening on this port (you need to specify the PID of the process using the netstat command):
cmd /c 'tasklist /svc | find "1180"'
Remote Desktop Can’t Find the Computer Through the RDWeb
Another error may occur in scenarios where you connect to internal RD hosts on your network through Windows Server with Remote Desktop Gateway (RDGW) or Remote Desktop Web Access (RDWeb) deployed:
RemoteApp Disconnected – Remote desktop can’t find the computer FQDN.
First, try to manually specify the correct RD Gateway address in the RDP connection settings:
- Open mstsc.exe on the client and navigate to the Advanced tab;
- Click the Settings tab in the Remote Desktop Gateway section;
- Select the Use these RD gateway server settings option and enter your externally available RDGW hostname;
- If you are trying to connect RDP host via RDGW within the local network, uncheck the option Bypass RD Gateway server for local addresses;
- Try to connect to the Remote Desktop.
Note. RDWebAccess by default uses the HTTPS (443) port instead of the default RDP 3389 port.
If the connection is successfully established, then you have a misconfigured RDWebAccess server.
To fix the problem,
- Open the IIS Remote management (inetmgr) console on the RD Web Access server;
- Go to Sites > Default Web Site > RDWeb > Pages;
- Open the Application Settings section and enter the external DNS name of your RD Gateway server in the DefaultTSGateway parameter;
- Now refresh the RDWeb page and try to establish an RDP connection again.
2 comments
Thank you for the information. You make the complicated seem easy and have given me a few more tools to navigate the quagmire of networking pitfalls.
Thanks for this info, I was thinking I hit another wall, but the very last step helped. The change in IIS application settings is what did the trick for me.