Last Update: Nov 19, 2024 | Published: Apr 07, 2015
In this Ask the Admin, I’ll show you how to reestablish a connection to an Azure VM where the Remote Desktop settings have accidentally been changed or disabled.
Out-of-band management on Azure VMs running in the public cloud can be a little harder compared to VMs hosted by on-premise Hyper-V servers because there’s no direct access to the VMbus. But the VM guest agent can be a life saver in situations where VMs stop responding, can no longer be connected to using Remote Desktop, or where you need to perform some other management operation to restore service.
The VM Agent installs a set of extensions that you can interface with from the command-line and in out-of-band management situations, including VMAccessAgent for resetting passwords and Remote Desktop configuration, and IaaSDiagnostics, which enables and configures Azure Diagnostics.
To demonstrate how these extensions can be used in practice, I’ll attempt to regain access to an Azure VM where Remote Desktop has been inadvertently disabled. The easiest way to do this is generate a Support Diagnostics Platform (SDP) package, which you can either distribute or use yourself for troubleshooting the problem.
First let’s generate an SDP package using Microsoft’s Support Diagnostics website. You’ll need to be logged in as a local administrator to Windows 8 or Windows Server 2012 or later to run the package, and the VM that’s experiencing a Remote Desktop problem must be started.
The browser will prompt you to run or save the application. You can choose as appropriate.
The troubleshooter will download the Azure PowerShell Module, which might take a few minutes.
The troubleshooter will execute the RDP Fix using the agent on the remote device. This can take a long time to complete, ranging from 10 minutes or more.
Once the troubleshooter has finished running all the tasks on the remote VM, you will see a message saying that the VM is restarting. After the reboot, you’ll be presented with a Remote Desktop dialog box so that you can test connectivity to the VM, and it should work as expected.