How to troubleshoot Windows VM Connectivity issue in Azure using Run Commands

This blog post is a part of a series, which discusses the different troubleshooting options available to troubleshoot the VM connectivity options in Azure. Recently, I encountered an issue where a customer wasn’t able to connect to a VM Deployed in Azure. While checking the VM Boot Diagnostic, I was able to confirm that VM is in start state but it wasn’t connecting using RDP. 

While looking at the Boot Diagnostic Serial console logs, I found out following information:


I then used Run Commands to check the VM Firewall Status and found-out that VM Firewall is turned on and blocking all the connections

netsh advfirewall show allprofiles

I then used following Run PowershellScript command to execute the script to turn off the firewall and it resolved the RDP connectivity issue for the VM

netshadvfirewall set allprofiles state off