Azure VM image availability via PS

There are situations and scenerios where we need to check weather particular image is available in certain location or not, is certain image available in the market place or not and so many other where we need to dig out Image , Publisher , offer etc etc.

So below is the few cmdlets which can help you figure out image or publisher or version as per your requirement.



$locName="West US"
$pubName="MicrosoftWindowsServer"

Get-AzVMImagePublisher -Location $locName | Select PublisherName

$offerName="WindowsServer"

Get-AzVMImageSku -Location $locName -PublisherName $pubName -Offer $offerName | where { $_.Skus -like '*Smalldisk'}

$skuName="2016-Datacenter-smalldisk"

Get-AzVMImage -Location $locName -PublisherName $pubName -Offer $offerName -Sku $skuName | Select Version

Get-AzVMImagePublisher -Location $locName | Select PublisherName


$version = "2016.127.20190603"

Get-AzVMImage -Location $locName -PublisherName $pubName -Offer $offerName -Skus $skuName -Version $version

1 comment:

Steps to Find Benchmarking of Applications Running on Azure

 Benchmarking involves establishing performance, utilization, and cost baselines for applications to identify optimization opportunities. He...