Redigera

Dela via


Set-AzFirewallPolicy

Saves a modified azure firewall policy

Syntax

Set-AzFirewallPolicy
   -Name <String>
   -ResourceGroupName <String>
   [-AsJob]
   [-ThreatIntelMode <String>]
   [-ThreatIntelWhitelist <PSAzureFirewallPolicyThreatIntelWhitelist>]
   [-BasePolicy <String>]
   [-DnsSetting <PSAzureFirewallPolicyDnsSettings>]
   [-SqlSetting <PSAzureFirewallPolicySqlSetting>]
   -Location <String>
   [-Tag <Hashtable>]
   [-IntrusionDetection <PSAzureFirewallPolicyIntrusionDetection>]
   [-TransportSecurityName <String>]
   [-TransportSecurityKeyVaultSecretId <String>]
   [-SkuTier <String>]
   [-UserAssignedIdentityId <String>]
   [-Identity <PSManagedServiceIdentity>]
   [-PrivateRange <String[]>]
   [-ExplicitProxy <PSAzureFirewallPolicyExplicitProxy>]
   [-Snat <PSAzureFirewallPolicySNAT>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzFirewallPolicy
   [-Name <String>]
   -InputObject <PSAzureFirewallPolicy>
   [-AsJob]
   [-ThreatIntelMode <String>]
   [-ThreatIntelWhitelist <PSAzureFirewallPolicyThreatIntelWhitelist>]
   [-BasePolicy <String>]
   [-DnsSetting <PSAzureFirewallPolicyDnsSettings>]
   [-SqlSetting <PSAzureFirewallPolicySqlSetting>]
   [-Location <String>]
   [-Tag <Hashtable>]
   [-IntrusionDetection <PSAzureFirewallPolicyIntrusionDetection>]
   [-TransportSecurityName <String>]
   [-TransportSecurityKeyVaultSecretId <String>]
   [-SkuTier <String>]
   [-UserAssignedIdentityId <String>]
   [-Identity <PSManagedServiceIdentity>]
   [-PrivateRange <String[]>]
   [-ExplicitProxy <PSAzureFirewallPolicyExplicitProxy>]
   [-Snat <PSAzureFirewallPolicySNAT>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzFirewallPolicy
   [-AsJob]
   -ResourceId <String>
   [-ThreatIntelMode <String>]
   [-ThreatIntelWhitelist <PSAzureFirewallPolicyThreatIntelWhitelist>]
   [-BasePolicy <String>]
   [-DnsSetting <PSAzureFirewallPolicyDnsSettings>]
   [-SqlSetting <PSAzureFirewallPolicySqlSetting>]
   -Location <String>
   [-Tag <Hashtable>]
   [-IntrusionDetection <PSAzureFirewallPolicyIntrusionDetection>]
   [-TransportSecurityName <String>]
   [-TransportSecurityKeyVaultSecretId <String>]
   [-SkuTier <String>]
   [-UserAssignedIdentityId <String>]
   [-Identity <PSManagedServiceIdentity>]
   [-PrivateRange <String[]>]
   [-ExplicitProxy <PSAzureFirewallPolicyExplicitProxy>]
   [-Snat <PSAzureFirewallPolicySNAT>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AzFirewallPolicy cmdlet updates an Azure Firewall Policy.

Examples

Example 1

Set-AzFirewallPolicy -InputObject $fp

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

Example 2

Set-AzFirewallPolicy -Name firewallPolicy1 -ResourceGroupName TestRg -Location westcentralus -ThreatIntelMode "Alert"

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

Example 3

$threatIntelWhitelist = New-AzFirewallPolicyThreatIntelWhitelist -IpAddress 23.46.72.91,192.79.236.79 -FQDN microsoft.com
Set-AzFirewallPolicy -Name firewallPolicy1 -ResourceGroupName TestRg -Location westcentralus -ThreatIntelWhitelist $threatIntelWhitelist

This example sets the firewall policy 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-AzFirewallPolicy -Name firewallPolicy1 -ResourceGroupName TestRg -Location westcentralus -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	
		Identity	                : null	
		IntrusionDetection	        : null	
		Location	                : "westcentralus"	
		Name	                    : "firewallPolicy1"	
		PrivateRange	            : null
		PrivateRangeText	        : "[]"
		ProvisioningState	        : null	
		ResourceGroupName	        : "TestRg"	
		ResourceGuid	            : null	
		RuleCollectionGroups	    : null	
		Sku	
			Tier	                : "Standard"	
		Snat	
			AutoLearnPrivateRanges	: null	
			PrivateRanges	        : null	
		SqlSetting	                : null	
		Tag	                        : null	
		TagsTable	                : null	
		ThreatIntelMode	            : "Alert"	
		ThreatIntelWhitelist	    : null	
		TransportSecurity	        : null	
		Type	                    : null

This example sets the firewall policy with the explicit proxy settings

Parameters

-AsJob

Run cmdlet in the background

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-BasePolicy

The base policy to inherit from

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DnsSetting

The DNS Setting

Type:PSAzureFirewallPolicyDnsSettings
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExplicitProxy

The Explicit Proxy Settings

Type:PSAzureFirewallPolicyExplicitProxy
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Identity

Firewall Policy Identity to be assigned to Firewall Policy.

Type:PSManagedServiceIdentity
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

The AzureFirewall Policy

Type:PSAzureFirewallPolicy
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-IntrusionDetection

The Intrusion Detection Setting

Type:PSAzureFirewallPolicyIntrusionDetection
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Location

location.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

The resource name.

Type:String
Aliases:ResourceName
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:True

-PrivateRange

The Private IP Range

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The resource group name.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:True

-ResourceId

The resource Id.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:True

-SkuTier

Firewall policy sku tier

Type:String
Accepted values:Standard, Premium, Basic
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Snat

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

Type:PSAzureFirewallPolicySNAT
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SqlSetting

The SQL related setting

Type:PSAzureFirewallPolicySqlSetting
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Tag

A hashtable which represents resource tags.

Type:Hashtable
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ThreatIntelMode

The operation mode for Threat Intelligence.

Type:String
Accepted values:Alert, Deny, Off
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ThreatIntelWhitelist

The allowlist for Threat Intelligence

Type:PSAzureFirewallPolicyThreatIntelWhitelist
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TransportSecurityKeyVaultSecretId

Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TransportSecurityName

Transport security name

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UserAssignedIdentityId

ResourceId of the user assigned identity to be assigned to Firewall Policy.

Type:String
Aliases:UserAssignedIdentity
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

PSAzureFirewallPolicy

Hashtable

Outputs

PSAzureFirewall