Azure – PowerShell Azure locations with zones


#Requires -module AzureRM
#find regions that support Zones and what VM SKus are supported

function Get-AzureRMlocationZones {
  PARAM ($location,$ComputeResourceSku)

  $sku=Get-AzureRmComputeResourceSku | Where-Object {$_.ResourceType -eq 'virtualMachines' -and $_.LocationInfo.Zones }

  if ($location) {
    $sku = $sku | Where-Object {$_.Locations -eq $location}
  }

  if ($ComputeResourceSku) {
    $sku = $sku | Where-Object {$_.Name -eq $ComputeResourceSku}
  }

  $sku
 }

#Get-AzureRMlocationZones -Location FranceCentral -Name Standard_D12_v2
 Get-AzureRMlocationZones -ComputeResourceSku Standard_D12_v2
Comments (0)

Skip to main content