Skip to content

Instantly share code, notes, and snippets.

@Staggerlee011
Last active May 20, 2019 14:16
Show Gist options
  • Select an option

  • Save Staggerlee011/a69022bb698339e4af573519f5b48c62 to your computer and use it in GitHub Desktop.

Select an option

Save Staggerlee011/a69022bb698339e4af573519f5b48c62 to your computer and use it in GitHub Desktop.
Find Azure image name in PowerShell
# Connect-AzureRmAccount
$location = "West Europe"
$publisher = "MicrosoftSQLServer"
$offer = "SQL2014SP2-WS2012R2"
$sku = "Standard"
Get-AzureRmVMImagePublisher -Location $location | where-object {$_.PublisherName.Contains("SQLServer")}
#Get-AzureRmVMImageOffer -Location $location -PublisherName $publisher
#Get-AzureRmVMImageSku -Location $location -PublisherName $publisher -Offer $offer
#Get-AzureRmVMImage -Location $location -PublisherName $publisher -Offer $offer -Skus $sku
<#
## Windows Server 2016
$location = "UK South"
$publisher = "MicrosoftWindowsServer"
$offer = "WindowsServer"
$sku = "2016-Datacenter"
## SQL Server
$location = "West Europe"
$publisher = "MicrosoftSQLServer"
$offer = "SQL2014SP2-WS2012R2"
$sku = "Standard"
## Windows 10
$location = "UK South"
$publisher = "MicrosoftWindowsDesktop"
$offer = "Windows-10"
$sku = "rs5-enterprise"
#>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment