Edit

Share via


Set-AzFirewallPolicyDraft

Saves a modified azure firewall policy draft

Syntax

SetByNameParameterSet (Default)

Set-AzFirewallPolicyDraft
    -AzureFirewallPolicyName <String>
    -ResourceGroupName <String>
    [-AsJob]
    [-ThreatIntelMode <String>]
    [-ThreatIntelWhitelist <PSAzureFirewallPolicyThreatIntelWhitelist>]
    [-BasePolicy <String>]
    [-DnsSetting <PSAzureFirewallPolicyDnsSettings>]
    [-SqlSetting <PSAzureFirewallPolicySqlSetting>]
    [-Tag <Hashtable>]
    [-IntrusionDetection <PSAzureFirewallPolicyIntrusionDetection>]
    [-PrivateRange <String[]>]
    [-ExplicitProxy <PSAzureFirewallPolicyExplicitProxy>]
    [-Snat <PSAzureFirewallPolicySNAT>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SetByInputObjectParameterSet

Set-AzFirewallPolicyDraft
    -InputObject <PSAzureFirewallPolicyDraft>
    [-AsJob]
    [-ThreatIntelMode <String>]
    [-ThreatIntelWhitelist <PSAzureFirewallPolicyThreatIntelWhitelist>]
    [-BasePolicy <String>]
    [-DnsSetting <PSAzureFirewallPolicyDnsSettings>]
    [-SqlSetting <PSAzureFirewallPolicySqlSetting>]
    [-Tag <Hashtable>]
    [-IntrusionDetection <PSAzureFirewallPolicyIntrusionDetection>]
    [-PrivateRange <String[]>]
    [-ExplicitProxy <PSAzureFirewallPolicyExplicitProxy>]
    [-Snat <PSAzureFirewallPolicySNAT>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SetByParentInputObjectParameterSet

Set-AzFirewallPolicyDraft
    -FirewallPolicyObject <PSAzureFirewallPolicy>
    [-AsJob]
    [-ThreatIntelMode <String>]
    [-ThreatIntelWhitelist <PSAzureFirewallPolicyThreatIntelWhitelist>]
    [-BasePolicy <String>]
    [-DnsSetting <PSAzureFirewallPolicyDnsSettings>]
    [-SqlSetting <PSAzureFirewallPolicySqlSetting>]
    [-Tag <Hashtable>]
    [-IntrusionDetection <PSAzureFirewallPolicyIntrusionDetection>]
    [-PrivateRange <String[]>]
    [-ExplicitProxy <PSAzureFirewallPolicyExplicitProxy>]
    [-Snat <PSAzureFirewallPolicySNAT>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SetByResourceIdParameterSet

Set-AzFirewallPolicyDraft
    -ResourceId <String>
    [-AsJob]
    [-ThreatIntelMode <String>]
    [-ThreatIntelWhitelist <PSAzureFirewallPolicyThreatIntelWhitelist>]
    [-BasePolicy <String>]
    [-DnsSetting <PSAzureFirewallPolicyDnsSettings>]
    [-SqlSetting <PSAzureFirewallPolicySqlSetting>]
    [-Tag <Hashtable>]
    [-IntrusionDetection <PSAzureFirewallPolicyIntrusionDetection>]
    [-PrivateRange <String[]>]
    [-ExplicitProxy <PSAzureFirewallPolicyExplicitProxy>]
    [-Snat <PSAzureFirewallPolicySNAT>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-AzFirewallPolicyDraft cmdlet updates an Azure Firewall Policy draft.

Examples

Example 1

Set-AzFirewallPolicyDraft -InputObject $fpDraft

This example sets the firewall policy draft with the new firewall policy draft value

Example 2

Set-AzFirewallPolicyDraft -AzureFirewallPolicyName firewallPolicy1 -ResourceGroupName TestRg -ThreatIntelMode "Alert"

This example sets the firewall policy draft with the new threat intel mode

Example 3

$threatIntelWhitelist = New-AzFirewallPolicyThreatIntelWhitelist -IpAddress 23.46.72.91,192.79.236.79 -FQDN microsoft.com
Set-AzFirewallPolicyDraft -AzureFirewallPolicyName firewallPolicy1 -ResourceGroupName TestRg -ThreatIntelWhitelist $threatIntelWhitelist

This example sets the firewall policy draft with the new threat intel allowlist

Example 4

$exProxy = New-AzFirewallPolicyExplicitProxy -EnableExplicitProxy  -HttpPort 100 -HttpsPort 101 -EnablePacFile  -PacFilePort 130 -PacFile "sampleurlfortesting.blob.core.windowsnet/nothing"
Set-AzFirewallPolicyDraft -AzureFirewallPolicyName firewallPolicy1 -ResourceGroupName TestRg -ExplicitProxy $exProxy
BasePolicy	                : null
		DnsSettings  	            : null
		Etag	                    : null
		ExplicitProxy
			EnableExplicitProxy	    : true
			EnablePacFile	        : true
			HttpPort	            : 100
			HttpsPort	            : 101
			PacFile                 : "sampleurlfortesting.blob.core.windowsnet/nothing"
			PacFilePort	            : 130
		Id	                        : null
		IntrusionDetection	        : null
		Location	                : "westcentralus"
		Name	                    : "firewallPolicy1"
		PrivateRange	            : null
		PrivateRangeText	        : "[]"
		ProvisioningState	        : null
		ResourceGroupName	        : "TestRg"
		ResourceGuid	            : null
		RuleCollectionGroups	    : null
		Snat
			AutoLearnPrivateRanges	: null
			PrivateRanges	        : null
		SqlSetting	                : null
		Tag	                        : null
		TagsTable	                : null
		ThreatIntelMode	            : "Alert"
		ThreatIntelWhitelist	    : null
		Type	                    : null

This example sets the firewall policy draft with the explicit proxy settings

Parameters

-AsJob

Run cmdlet in the background

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AzureFirewallPolicyName

The resource name.

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False

Parameter sets

SetByNameParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-BasePolicy

The base policy to inherit from

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DnsSetting

The DNS Setting

Parameter properties

Type:PSAzureFirewallPolicyDnsSettings
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExplicitProxy

The Explicit Proxy Settings

Parameter properties

Type:PSAzureFirewallPolicyExplicitProxy
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-FirewallPolicyObject

The AzureFirewall Policy associated with the draft

Parameter properties

Type:PSAzureFirewallPolicy
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByParentInputObjectParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-InputObject

The AzureFirewall Policy draft

Parameter properties

Type:PSAzureFirewallPolicyDraft
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetByInputObjectParameterSet
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-IntrusionDetection

The Intrusion Detection Setting

Parameter properties

Type:PSAzureFirewallPolicyIntrusionDetection
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrivateRange

The Private IP Range

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The resource group name.

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False

Parameter sets

SetByNameParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ResourceId

The resource Id.

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False

Parameter sets

SetByResourceIdParameterSet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Snat

The private IP addresses/IP ranges to which traffic will not be SNAT in Firewall Policy.

Parameter properties

Type:PSAzureFirewallPolicySNAT
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SqlSetting

The SQL related setting

Parameter properties

Type:PSAzureFirewallPolicySqlSetting
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Tag

A hashtable which represents resource tags.

Parameter properties

Type:Hashtable
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ThreatIntelMode

The operation mode for Threat Intelligence.

Parameter properties

Type:String
Default value:None
Accepted values:Alert, Deny, Off
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ThreatIntelWhitelist

The allowlist for Threat Intelligence

Parameter properties

Type:PSAzureFirewallPolicyThreatIntelWhitelist
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

PSAzureFirewallPolicy

Hashtable

Outputs

PSAzureFirewall