BeatBug
BeatBug

Reputation: 11

How to enable all the firewall rules on Azure Application Gateway via Powershell?

I'm preparing a script to change several aspects of an existing Azure Aplication Gateway. Previously, my team had disabled some of the rules on the WAF. My intention is to enhact them all again, thus disabling advanced configuration. I can't find the way to do this via Powershell.

Upvotes: 1

Views: 441

Answers (1)

nobodyfromhell
nobodyfromhell

Reputation: 349

WAF rules are not about App GW, it's a separate feature in the Azure. So, you should use:

Get-AzApplicationGatewayFirewallPolicy | Set-AzApplicationGatewayFirewallPolicy

https://learn.microsoft.com/en-us/powershell/module/az.network/set-azapplicationgatewayfirewallpolicy?view=azps-7.1.0

Also, as an example you can look here:

https://learn.microsoft.com/en-us/azure/application-gateway/scripts/waf-custom-rules-powershell#sample-script

Upvotes: 1

Related Questions