< Back

Set-AzureRmApplicationGatewayWebApplicationFirewallConfiguration

Tue Jan 29, 2019 9:58 pm

NAME Set-AzureRmApplicationGatewayWebApplicationFirewallConfiguration



SYNOPSIS

Modifies the WAF configuration of an application gateway.





SYNTAX

Set-AzureRmApplicationGatewayWebApplicationFirewallConfiguration -ApplicationGateway <PSApplicationGateway> [-DefaultProfile

<IAzureContextContainer>] [-DisabledRuleGroups

<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallDisabledRuleGroup]>] -Enabled <Boolean>

-FirewallMode {Detection | Prevention} [-RuleSetType {OWASP}] [-RuleSetVersion {3.0 | 2.2.9}] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Set-AzureRmApplicationGatewayWebApplicationFirewallConfiguration cmdlet modifies the web application firewall (WAF) configuration of an

application gateway.





PARAMETERS

-ApplicationGateway <PSApplicationGateway>

Specifies an application gateway object. You can use the Get-AzureRmApplicationGateway cmdlet to get an application gateway object.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DisabledRuleGroups <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSApplicationGatewayFirewallDisabledRuleGroup]>

The disabled rule groups.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Enabled <Boolean>

Indicates whether the web application firewall is enabled.



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-FirewallMode <String>

Specifies the web application firewall mode. The acceptable values for this parameter are:



- Detection



- Prevention



Required? true

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-RuleSetType <String>

The type of the web application firewall rule set. The acceptable values for this parameter are:



- OWASP



Required? false

Position? named

Default value OWASP

Accept pipeline input? False

Accept wildcard characters? false



-RuleSetVersion <String>

The version of the rule set type. The acceptable values for this parameter are:



- 3.0



- 2.2.9



Required? false

Position? named

Default value 3.0

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

PSApplicationGateway

Parameter 'ApplicationGateway' accepts value of type 'PSApplicationGateway' from the pipeline





OUTPUTS

Microsoft.Azure.Commands.Network.Models.PSApplicationGateway







NOTES









Example 1: Update the application gateway web application firewall configuration



PS C:\\> $AppGw = Get-AzureRmApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01"

PS C:\\> Set-AzureRmApplicationGatewayWebApplicationFirewallConfiguration -ApplicationGateway $AppGw -Enabled $True -FirewallMode "Detection"

-RuleSetType "OWASP" -RuleSetVersion "3.0"



The first command gets the application gateway named ApplicationGateway01 and then stores it in the $AppGw variable.



The second command enables the firewall configuration for the application gateway stored in $AppGw and sets the firewall mode to "Detection",

RuleSetType to "OWASP" and the RuleSetVersion to "3.0".







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... figuration

Get-AzureRmApplicationGatewayAvailableSslOptions

Get-AzureRmApplicationGatewayWebApplicationFirewallConfiguration

New-AzureRmApplicationGatewayWebApplicationFirewallConfiguration