Use the latest SKU version when creating a VM

Use the latest version of an image when creating a VM with AzureRM

John Savill

January 15, 2016

1 Min Read
Use the latest SKU version when creating a VM

Q. How can I use the latest version of SKUs for an offer from Azure?

A. Vendors constantly update their versions of offers in the marketplace. To get the latest version you can use the PowerShell below.

$AzureImageSku = Get-AzureRmVMImage -Location $loc -PublisherName "MicrosoftWindowsServer" `    -Offer "WindowsServer" -Skus "2012-R2-Datacenter"$AzureImageSku = $AzureImageSku | Sort-Object Version -Descending #put the newest first$AzureImageSku[0] #Newest

 

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like