Redigera

Dela via


New-AzFirewallPolicyDnsSetting

Creates a new DNS Setting for Azure Firewall Policy

Syntax

New-AzFirewallPolicyDnsSetting
   [-EnableProxy]
   [-Server <String[]>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzFirewallPolicyDnsSetting cmdlet creates a DNS Setting Object for Azure Firewall Policy

Examples

Example 1. Create an empty policy

New-AzFirewallPolicyDnsSetting -EnableProxy

This example creates a dns Setting object with setting enabling dns proxy.

Example 2. Create an empty policy with ThreatIntel Mode

$dnsServers = @("10.10.10.1", "20.20.20.2")
New-AzFirewallPolicyDnsSetting -EnableProxy -Server $dnsServers

This example creates a dns Setting object with setting enabling dns proxy and setting custom dns servers.

Parameters

-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

-EnableProxy

Enable DNS Proxy. By default it is disabled.

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

-Server

The list of DNS Servers

Type:String[]
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

None

Outputs

PSAzureFirewallPolicyDnsSettings