New-​Azure​Rm​Dns​Zone

Creates a new DNS zone.

Syntax

New-AzureRmDnsZone
   -Name <String>
   -ResourceGroupName <String>
   [-Tag <Hashtable>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-AzureRmDnsZone cmdlet creates a new Domain Name System (DNS) zone in the specified resource group. You must specify a unique DNS zone name for the Name parameter or the cmdlet will return an error. After the zone is created, use the New-AzureRmDnsRecordSet cmdlet to create record sets in the zone.

You can use the Confirm parameter and $ConfirmPreference Windows PowerShell variable to control whether the cmdlet prompts you for confirmation.

Examples

Example 1: Create a DNS zone

PS C:\>$Zone = New-AzureRmDnsZone -Name "myzone.com" -ResourceGroupName "MyResourceGroup"

This command creates a new DNS zone named myzone.com in the specified resource group, and then stores it in the $Zone variable.

Required Parameters

-Name

Specifies the name of the DNS zone to create.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the resource group in which to create the zone.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-Tag

Specifies an array of tags to associate with the DNS zone. Tags are name-value pairs represented as hash tables, for example, @(@{"Name"="dept"; "Value"="shopping"}, @{"Name"="env"; "Value"="production"})

Type:Hashtable
Aliases:Tags
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-WhatIf

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

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

Inputs

None

You cannot pipe input to this cmdlet.

Outputs

Microsoft.Azure.Commands.Dns.DnsZone

This cmdlet returns an object that represents the new DNS zone.

Notes

You can use the Confirm parameter to control whether this cmdlet prompts you for confirmation. By default, the cmdlet prompts you for confirmation if the $ConfirmPreference Windows PowerShell variable has a value of Medium or lower.

If you specify Confirm or Confirm:$True, this cmdlet prompts you for confirmation before it runs. If you specify Confirm:$False, the cmdlet does not prompt you for confirmation.