cloud recovery

Fix RDP on Azure Virtual Machine

Q: I disabled RDP on my Azure virtual machine; how can I re-enable it?

A: As long as your virtual machine has the Azure VM Agent installed, it's very simple to fix the RDP configuration on the virtual machine using PowerShell. To check whether the VM Agent is installed, run the following command:

Get-AzureVM –ServiceName <service> -Name <vm>

Note whether the GuestAgentStatus is populated. To enable RDP and ensure the required firewall exception is enabled, run the following command:

Get-AzureVM –ServiceName <service> -Name <vm> | Set-AzureVMAccessExtension | Update-AzureVM

You should now be able to RDP to the server. If you still can't connect to the virtual machine, try restarting it. If you still can't connect, you can try a few other fixes, such as recreating the endpoint, moving the virtual machine to another Azure host by changing the virtual machine configuration, and even recreating the virtual machine. Microsoft has a great blog post, "Troubleshooting Endpoint Connectivity (RDP/SSH/HTTP, etc. failures)," that walks through troubleshooting RDP connectivity.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.