Microsoft Azure - How To Get Details About Azure VM Images Using PowerShell

In this blog, we will discuss how to check the details of the Virtual Machine images available in Microsoft Azure.

At the time of creation of a Virtual Machine, we need to select the image for our VM -- that can be Windows images, SQL Server images, Linux images, SharePoint, etc.

We can also create our own VM image and upload that to the portal and also, we can use that image to create a new Virtual Machine.


Microsoft provides some specialized images like Windows Server with SQL Server preinstalled, so we don’t need to install an SQL Server on it after creating a Virtual Machine. Well, it saves time.

So, in PowerShell, to get the details about the VM images available, we need to simply write the command-


It will list out all the available images with detailed information like OS, Image Family, Location, Disk Size in GB, etc.


To get the names of the ImageFamily available in Azure, we can write the command –

Get-AzureVMImage | Select ImageFamily


So, here, we get the names of Image Family but it will list all the names as per the VM images and that’s why it's repetitive.

To get the unique names of Image Family, we need to write the command like this –

Get-AzureVMImage | Select ImageFamily - Unique


So, we have learned how to get the details of the VM images using PowerShell command. In the upcoming blogs, when we will create the VMs using PowerShell, these commands will help out in choosing the right image to fulfill our requirement.