How to Start and Stop Azure Application Gateway in Azure PowerShell

To save on costs on running Azure Application Gateway in non production environments, I run the following Azure PowerShell commands.

Login with Azure PowerShell to your subscription

$resourceGroupName = <name>
$azureAppGatewayName = <name>

$appGateway= Get-AzApplicationGateway -Name $azureAppGatewayNam -ResourceGroupName $resourceGroupName
Stop-AzApplicationGateway -ApplicationGateway $appGateway

Start-AzApplicationGateway -ApplicationGateway $appGateway

Hope this helps.

Leave a Reply