Get-AzureDnsZone

Get-AzureDnsZone

Gets a DNS zone.

Syntax

Parameter Set: Default
Get-AzureDnsZone -ResourceGroupName <String> [-EndsWith <System.String> ] [-Name <String> ] [-Profile <Microsoft.Azure.Common.Authentication.Models.AzureProfile> ] [ <CommonParameters>]

Detailed Description

The Get-AzureDnsZone cmdlet gets a Domain Name System (DNS) zone from the specified resource group. If you specify the Name parameter, a single DnsZone object is returned. If you do not specify the Name parameter, an array containing all of the zones in the specified resource group is returned. You can use the DnsZone object to update the zone, for example you can add RecordSet objects to it.

Parameters

-EndsWith<System.String>

Specifies a suffix to use as a filter when you get multiple zones.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of the DNS zone to get. If you do not specify the Name parameter, all zones in the specified resource group are returned.

Aliases

none

Required?

false

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 that contains the zone to get.

Aliases

none

Required?

true

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 (http://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 DNS zone. If the zone name is not specified, an array of zone objects is returned.

Examples

Example 1: Get a zone

This command gets the zone named myzone.com from the specified resource group, and then stores it in the $Zone variable.

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

Example 2: Get all of the zones in a resource group

This command gets all of the zones in the specified resource group, and then stores it in the $Zone variable.

PS C:\> $Zone = Get-AzureDnsZone -ResourceGroupName "MyResourceGroup"

New-AzureDnsZone

Remove-AzureDnsZone

Set-AzureDnsZone