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.
Use the latest version of an image when creating a VM with AzureRM
January 15, 2016
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
You May Also Like