Skip to content

Commit 1ac8798

Browse files
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-pr into fileVSev
2 parents 24054a8 + 1b013dc commit 1ac8798

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

articles/web-application-firewall/ag/configure-waf-custom-rules.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: Configure v2 custom rules using PowerShell
33
titleSuffix: Azure Web Application Firewall
4-
description: Learn how to configure WAF v2 custom rules using Azure PowerShell. You can create your own rules evaluated for each request that passes through the firewall.
4+
description: Learn how to configure Web Application Firewall (WAF) v2 custom rules using Azure PowerShell. You can create your own rules evaluated for each request that passes through the firewall.
55
services: web-application-firewall
66
author: vhorne
77
ms.service: web-application-firewall
88
ms.topic: article
9-
ms.date: 11/16/2019
9+
ms.date: 05/21/2020
1010
ms.author: victorh
1111
---
1212

@@ -133,6 +133,19 @@ $appgw = New-AzApplicationGateway -Name $appgwName -ResourceGroupName $rgname `
133133
-FirewallPolicy $wafPolicy
134134
```
135135

136+
## Update your WAF
137+
138+
After you create your WAF, you can update it using a procedure similar to the following code:
139+
140+
```azurepowershell
141+
# Get the existing policy
142+
$policy = Get-AzApplicationGatewayFirewallPolicy -Name $policyName -ResourceGroupName $RGname
143+
# Add an existing rule named $rule
144+
$policy.CustomRules.Add($rule)
145+
# Update the policy
146+
Set-AzApplicationGatewayFirewallPolicy -InputObject $policy
147+
```
148+
136149
## Next steps
137150

138151
[Learn more about Web Application Firewall on Application Gateway](ag-overview.md)

0 commit comments

Comments
 (0)