Remove-AzureDnsZone

Remove-AzureDnsZone

Removes a DNS zone from a resource group.

Syntax

Parameter Set: Fields
Remove-AzureDnsZone -Name <String> -ResourceGroupName <String> [-Force] [-PassThru] [-Profile <Microsoft.Azure.Common.Authentication.Models.AzureProfile> ] [ <CommonParameters>]

Parameter Set: Object
Remove-AzureDnsZone -Zone <DnsZone> [-Force] [-Overwrite] [-PassThru] [-Profile <Microsoft.Azure.Common.Authentication.Models.AzureProfile> ] [ <CommonParameters>]

Detailed Description

The Remove-AzureDnsZone cmdlet removes a Domain Name System (DNS) zone from a specified resource group. Before you run this cmdlet, you must first remove all record sets from the zone that you want to remove.

You can pass a DnsZone object to this cmdlet as a parameter or by using the pipeline operator, or alternatively you can specify its name.

Parameters

-Force

Forces the command to run without asking for user confirmation.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of the DNS zone to remove.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-Overwrite

Indicates that this cmdlet ignores the Etag when deleting the resource group, and that the resource group is removed even if it has changed since the last Get.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ResourceGroupName<String>

Specifies the name of the resource group that contains the zone to remove.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByPropertyName)

Accept Wildcard Characters?

false

-Zone<DnsZone>

Specifies the DNS zone to remove.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true(ByValue)

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.

  • Microsoft.Azure.Commands.Dns.DnsZone

    You can pipe a DnsZone object to this cmdlet.

Outputs

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

  • None

    This cmdlet does not generate any output.

Examples

Example 1: Remove a zone

This command removes the zone named myzone.com from the resource group named MyResourceGroup.

PS C:\> Remove-AzureDnsZone -Name "myzone.com" -ResourceGroupName "MyResourceGroup"

Get-AzureDnsZone

New-AzureDnsZone

Set-AzureDnsZone