Last active
June 26, 2020 14:32
-
-
Save juanesech/524b3813542834a04f559a56dc4139d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Delete default WAF settings. | |
.DESCRIPTION | |
This script deletes the default setting created when the WAF is deployed using building blocks. | |
.EXAMPLE | |
.\cleanWAF.ps1 -WAFName WAFTEST01 | |
#> | |
param( | |
[Parameter(Mandatory=$true)] | |
[string]$SubscriptionName, | |
[string]$ResourceGroupName, | |
[string]$WAFName | |
) | |
$DefaultBackend = appGatewayBackendPool | |
$DefaultHTTPSettings = appGatewayBackendSettings-http | |
$DefaultListener = appGatewayListener-http | |
$DefaultRule = HTTP_rule | |
Set-AzContext -SubscriptionName $SubscriptionName | |
Remove-AzApplicationGatewayBackendHttpSetting -Name $DefaultHTTPSettings -ApplicationGateway $WAFName | |
Remove-AzApplicationGatewayHttpListener -Name $DefaultListener -ApplicationGateway $WAFName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment