New-AzureDnsZone

New-AzureDnsZone

Creates a new DNS zone.

Syntax

Parameter Set: Default
New-AzureDnsZone -Name <String> -ResourceGroupName <String> [-Profile <Microsoft.Azure.Common.Authentication.Models.AzureProfile> ] [-Tag <Hashtable[]> ] [ <CommonParameters>]

Detailed Description

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

Parameters

-Name<String>

Specifies the name of the DNS zone to create.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-Profile<Microsoft.Azure.Common.Authentication.Models.AzureProfile>

Specifies an Azure profile.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ResourceGroupName<String>

Specifies the resource group in which to create the zone.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-Tag<Hashtable[]>

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"})

Aliases

Tags

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

    You cannot pipe input to this cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Azure.Commands.Dns.DnsZone

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

Examples

Example 1: Create a DNS zone

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

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

Get-AzureDnsZone

New-AzureDnsRecordSet

Remove-AzureDnsZone

Using tags to organize your Azure resources