Created
June 12, 2019 14:27
-
-
Save mmckechney/9030112b635363d2a6acb9ba9875764c to your computer and use it in GitHub Desktop.
Get Application Gateway Sku's for all gateways
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$properties = @{Name = ""; ResourceGroupName =""; Location = ""; SkuName = ""; SkuTier = ""; Subscription = ""} | |
$gwTemplate = New-Object -TypeName PSObject -Property $properties | |
$qwCollection = @() | |
$subs = Get-AzSubscription | |
foreach($sub in $subs) | |
{ | |
Select-AzSubscription -Subscription $sub.Name | |
$gws = Get-AzApplicationGateway | |
foreach($gw in $gws) | |
{ | |
$qwObj = $gwTemplate.PSObject.Copy() | |
$qwObj.Subscription = $sub.Name | |
$qwObj.Name = $gw.Name | |
$qwObj.ResourceGroupName =$gw.ResourceGroupName | |
$qwObj.Location = $gw.Location | |
$qwObj.SkuName = $gw.Sku.Name | |
$qwObj.SkuTier = $gw.Sku.Tier | |
$qwCollection += $qwObj | |
} | |
} | |
$qwCollection | Format-Table | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This PowerShell script will:
Connect-AzAccount
first to login)Note, if the SkuName contains
WAF_V2
orStandard_v2
then the gateway is the newer v2 version of the gateway