This Azure article will discuss how to fix the error “Remote desktop cannot connect to the remote computer” that I got while connecting to my Azure Virtual Machine.
Table of Contents
Remote desktop can’t connect to the remote computer for one of these reasons
Below is the complete error message.
The remote desktop cannot connect to the remote computer for one of these reasons:
- 1-Remote Access to the server is not enabled.
- 2-The remote computer is turned off.
- 3-The remote computer is not available on the network.
Make sure the remote computer is turned on and connected to the network, and that remote access is enabled.
You can see the same error in the screenshot below.

Problem Cause and Solutions
There could be multiple reasons for and solutions to this issue. Let’s discuss them one by one.
Solution
To fix the issue, you need to follow the below steps
1. Log in to https://portal.azure.com/
2. Search for Virtual machines there.

3. You will see the list of VM created in your Azure subscription. It will show the VM name, Type, Status, resource group, Location, etc.

4. Now click on the VM name. “MyNewVM” in my case. You can see the details of your virtual machine like Public IP address, status, Computer name, Operating system, Size, etc.
As you can see, the VM status is Stopped(deallocated). The status should be running.

5. Now click on the Start button.

6. As you can see, the VM Status is changed to “Running”.

7. Now, you should be able to connect to the virtual machine successfully without any issues. Click on the Connect button.

If the above solution doesn’t work, then you can check out the solutions below.
1. You should check the network connectivity.
One of the most common reasons for this error is an issue with the network’s connectivity. For example, there might be a chance that the firewall is blocking access to the Azure Virtual machine.
You can use the Telnet client to check the connectivity to the Azure Virtual machine. One key advantage of using the Telnet client is that you can easily check whether the RDP port 3389 is open.
You can use the below command from the command prompt to enable the Telnet from the command prompt
dism /online /Enable-Feature /FeatureName:TelnetClientIf you are using PowerShell, then you can use the below PowerShell cmdlet to enable the Telnet
Install-WindowsFeature -name Telnet-Client2. Check the User Permissions
Cross-check the user permissions that might be the reason for this error. Note that if the user does not have administrator privileges, there is a group called the local Remote Desktop Users group; the user should belong to that group to access the Remote machine via RDP. Normally, there won’t be any member who belongs to the local Remote Desktop Users group by default unless and until any of the users are added manually. So, only the Administrator’s group members can access the remote machine via RDP.
3. Enable Remote Desktop Connection
This is one of the common causes of the error “Remote Desktop can’t connect to the remote computer.” People usually miss enabling the Remote Desktop Connection option, which can be enabled in multiple ways, including the System Properties, PowerShell cmdlet, Command Prompt, etc.
Using System Properties
You can follow the below steps to enable the Remote Desktop Connection option.
- On your machine, select start –> Run –> type sysdm. cpl.
- Navigate to the Remote tab.
- Select Allow remote connections to this computer, then click the OK button to save the changes.

Using PowerShell cmdlet
To enable Remote Desktop Connection, you can also use the PowerShell cmdlet as below
(Get-WmiObject Win32_TerminalServiceSetting -Computername [ComputerName] ‑Namespace root\cimv2\TerminalServices).SetAllowTsConnections(1,1)Using the command prompt
If you don’t have PowerShell installed on your machine, you can use the below command on your command prompt to enable the Remote Desktop Connection option.
REG ADD "\\[RemoteComputer] \HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /d 0 /f /t REG_DWORD4. Verify If Group Policy is blocking RDP
Another reason could be that there is a chance that Group Policy is blocking the RDP. You need to follow the below steps to verify that.
- Select-> Run and then type gpedit.msc
- Click on Computer Configuration—> Administrative Templates—> Windows Components—> Then select Remote Desktop Services—> Now select Remote Desktop Session Host and then Connections.
- The next step is to find the Allow users to connect remotely by using the Remote Desktop Services setting.
- Make sure to change the settings to Enabled or Not Configured.
5. Cross-check the RDP listener port status
You can always cross-check the RDP listener port status on your remote computer. By default, it should listen to port 3389. At the same time, make sure that another application does not occupy the same port 3389. You can verify that using the below steps
- Navigate to Start –> Run and then type regedit
- Go to HKEY_LOCAL_MACHINE > SYSTEM –> then select CurrentControlSet –> Control –> Terminal Server –> WinStations –> RDP-Tcp
- Review the PortNumber setting
Final Thoughts
In this article, we discussed how to fix the error “”Remote desktop cannot connect to the remote computer” error that I got while connecting to my Azure Virtual Machine.”

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
