Search This Blog

Tuesday, October 21, 2014

Fix RDP Access Using VM Agent Access Extension on Azure VM

 

I’ve accidentally disable Remote Desktop on a virtual machine and now was unable to access VM via RDP. In order for me to RDP, we can fix the rdp access by using VM Agent Access Extension.To do so, open Windows Azure Powershell

Get-AzureVM

Note:- Identify VM and Services name

image

$labvm1 = get-azurevm –name lab-pwin10 –servicename lab-pwin10

image

To identify if the virtual machine has installed with VM Agent Extension, type

$labvm1.vm.ProvisionGuestAgent

The result should be “true” or you can view from dashboard

image

Set-AzureVMAccessExtension –vm $labvm1 | Update-AzureVM

The command ensure that RDP access is enabled and that the VM has a firewall rules that permit RDP access.

image

 

Finally restart virtual machine and that should do the trick and you will able to RDP into the VM

Related post:-