Create VM image and size availability matrix from Azure

In my previous post, I described how to retrieve a list of available VM sizes and images from Azure using PowerShell. I’ve written two scripts which do exactly that. The scripts allow you to create an availability matrix containing either a list of VM sizes or a list of VM images you can use to deploy your IaaS VMs.

These 2 scripts will output to a CSV file which can be imported in Excel to do filtering. This gives you an easy overview on which VM images are available in which Azure locations. The same goes for VM sizes (eg. Basic_A0, Standard_GS1, etc.).

Usage and Output

Both scripts come with synopsis, so you can use the Get-Help cmdlet on them. In the most basic form, you will need to define the output path (filename) of the CSV file which will be generated. This will prompt you for the credentials to be used and retrieves ALL available Azure locations. For example:

Export-AzureVMImages.ps1 -Path "C:\Data\AzureImages.csv"
Export-AzureVMSizes.ps1 -Path "C:\Data\AzureVMSizes.csv"

If you want to do a comparison of certain Azure locations (eg. availability in West US and West Europe), you can define the -Location parameter:

Export-AzureVMImages.ps1 -Path "C:\Data\AzureImages.csv" -Location "West US 2","West Europe"

As described above, the scripts output to CSV. By default, comma is used as field separator. If you want to modify this, use the -CSVDelimiter parameter to define your preferred separator character. This parameter accepts one or more strings (separated by comma) as value. For example:

Export-AzureVMImages.ps1 -Path "C:\Data\AzureImages.csv" -CSVDelimiter ";"

Once generated, you can open the CSV in Excel:

Azure Image availability matrix in Excel

Feel free to use and modify the scripts in any way you like.


I’ve uploaded the scripts to the Microsoft Technet Gallery. If you like the scripts, don’t forget to give the scripts a rating on the Microsoft Gallery page.

The script to generate a VM Image (Export-AzureVMImages.ps1) availability matrix is available here:
The script to generate a VM Size (Export-AzureVMSizes.ps1) availability matrix is available here:

I hope these scripts are useful, if you have any questions or remarks, please leave a comment or feel free to send me an email.

One thought to “Create VM image and size availability matrix from Azure”

Leave a Reply

Your email address will not be published. Required fields are marked *

Complete the following sum: * Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.