Skip navigation
Use the latest SKU version when creating a VM

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

 

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish