Select Page

When you’re provisioning Azure VMs from PowerShell, you need to specify an image to pass into the Azure VM Config. If you’ve ever enumerated the available images using the Get-AzureVMImage cmdlet, you will have noticed there are many, many, many available images with more being added all the time.

If you want to see which vanilla Windows Server VM images are available you need to filter out all of the noise which is exactly what this little script does.

Strictly speaking this script does not filter in the PowerShell sense, but it works for me 😉

$azureimages = Get-AzureVMImage
Write-Host "Windows VM Imagess available:" ; Write-Host
ForEach ($azureimage in $azureimages) {
	If (($azureimage.Label -match "Windows Server") -and ($azureimage.Label -notmatch "on Windows Server")) {