Skip to content

Commit 1255ba2

Browse files
committed
variables for resource group name
1 parent cffc9d8 commit 1255ba2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

articles/web-application-firewall/ag/quick-create-template.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,12 @@ Use IIS to test the application gateway:
6666
4. Change the custom rule to **Allow traffic**.
6767
Run the following Azure PowerShell script, replacing your resource group name:
6868
```azurepowershell
69-
$AppGW = Get-AzApplicationGateway -Name myAppGateway -ResourceGroupName <your resource group name>
70-
$pol = Get-AzApplicationGatewayFirewallPolicy -Name WafPol01 -ResourceGroupName <your resource group name>
69+
$rg = <your resource group name>
70+
$AppGW = Get-AzApplicationGateway -Name myAppGateway -ResourceGroupName $rg
71+
$pol = Get-AzApplicationGatewayFirewallPolicy -Name WafPol01 -ResourceGroupName $rg
7172
$pol[0].customrules[0].action = "allow"
7273
$rule = $pol.CustomRules
73-
Set-AzApplicationGatewayFirewallPolicy -Name WafPol01 -ResourceGroupName <your resource group name> -CustomRule $rule
74+
Set-AzApplicationGatewayFirewallPolicy -Name WafPol01 -ResourceGroupName $rg -CustomRule $rule
7475
$AppGW.FirewallPolicy = $pol
7576
Set-AzApplicationGateway -ApplicationGateway $AppGW
7677
```

0 commit comments

Comments
 (0)