Getting all Azure VMs RDP files

Once you have deployed Azure VM: s and they are running some workloads you might need to RDP to them, instead of using any of the portals and have several click steps before getting the RDP file here are some useful scripts I have been using.

If you just need single RDP file the Get-AzureRemoteDesktopFile (GetAzureRemoteDesktopFile ServiceName “myservice”Name “MyVM-01_IN_0” –Launch) is pretty handy.


But if you 15 servers you need an another solution.

I am using Remote Desktop Connection Manager 2.7 and getting all the RDPS grouped in a single configuration file that I import to RDCM 2.7.

Get the script for it here, credit to Stuart Leeks


  1. Open Azure PowerShell How to install
  2. Select-AzureSubscription that contains the Virtual Machines you want to export the RDPs.
  3. Download/copy and run the Script. (I mostly use Power Shell ISE to get better overview and it is easier to edit in)
  4. Open the .rdg file in RDCM



Here at two other scripts I have used depending on the requirements from customers. – credit to Courtenay Bernier – credit to Hasan Gural


Not too often, but it happens, I have needed to troubleshoot the connections and as stated in a previous post the “official sites” are my first go to.

Here is a link for Troubleshoot Remote Desktop connections to a Windows-based Azure virtual machine


One thought on “Getting all Azure VMs RDP files

Leave a Comment