Created
June 5, 2021 11:41
-
-
Save ajomathew/d4ee44268cc7818a006a18f9fb6767c3 to your computer and use it in GitHub Desktop.
This script can be used to find the VM Source Image available SKU in Azure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Finding your SKUs for your VM | |
$locName = Read-Host 'Enter which location you want' | |
#List Publishers | |
# $locName="<Azure location, such as West US>" | |
Get-AzVMImagePublisher -Location $locName | Select PublisherName | |
$pubName=Read-Host 'Enter publisher your want' | |
Get-AzVMImageOffer -Location $locName -PublisherName $pubName | Select Offer | |
$offerName=Read-Host 'Enter the offer' | |
Get-AzVMImageSku -Location $locName -PublisherName $pubName -Offer $offerName | Select Skus | |
$skuName=Read-Host 'Enter SKU' | |
Get-AzVMImage -Location $locName -PublisherName $pubName -Offer $offerName -Sku $skuName | Select Version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment