File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
articles/web-application-firewall/ag Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -66,11 +66,12 @@ Use IIS to test the application gateway:
66
66
4 . Change the custom rule to ** Allow traffic** .
67
67
Run the following Azure PowerShell script, replacing your resource group name:
68
68
``` 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
71
72
$pol[0].customrules[0].action = "allow"
72
73
$rule = $pol.CustomRules
73
- Set-AzApplicationGatewayFirewallPolicy -Name WafPol01 -ResourceGroupName <your resource group name> -CustomRule $rule
74
+ Set-AzApplicationGatewayFirewallPolicy -Name WafPol01 -ResourceGroupName $rg -CustomRule $rule
74
75
$AppGW.FirewallPolicy = $pol
75
76
Set-AzApplicationGateway -ApplicationGateway $AppGW
76
77
```
You can’t perform that action at this time.
0 commit comments