次の方法で共有


Remove-AzDnsZone

Removes a DNS zone from a resource group.

構文

Fields

Remove-AzDnsZone
    -Name <String>
    -ResourceGroupName <String>
    [-Force]
    [-PassThru]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Object

Remove-AzDnsZone
    -Zone <DnsZone>
    [-Overwrite]
    [-Force]
    [-PassThru]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

説明

The Remove-AzDnsZone cmdlet permanently deletes a Domain Name System (DNS) zone from a specified resource group. All record sets contained in the zone are also deleted.

You can pass a DnsZone object using the Name parameter or by using the pipeline operator, or alternatively you can specify the ZoneName and ResourceGroupName parameters.

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

When specifying the zone using a DnsZone object (passed via the pipeline or Zone parameter), the zone is not deleted if it has been changed in Azure DNS since the local DnsZone object was retrieved (only operations directly on the DNS zone resource count as changes, operations on record sets within the zone do not). This provides protection for concurrent zone changes. This can be suppressed using the Overwrite parameter, which deletes the zone regardless of concurrent changes.

Example 1: Remove a zone

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

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

パラメーター

-Confirm

Prompts you for confirmation before running the cmdlet.

パラメーターのプロパティ

型:SwitchParameter
規定値:False
ワイルドカードのサポート:False
DontShow:False
Aliases:cf

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-Force

This parameter is deprecated for this cmdlet. It will be removed in a future release.

To control whether this cmdlet prompts you for confirmation, use the Confirm parameter.

パラメーターのプロパティ

型:SwitchParameter
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-Name

Specifies the name of the DNS zone that this cmdlet removes. You must also specify the ResourceGroupName parameter.

Alternatively, you can specify the DNS zone using the Zone parameter.

パラメーターのプロパティ

型:String
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

Fields
配置:Named
必須:True
パイプラインからの値:False
プロパティ名別のパイプラインからの値:True
残りの引数からの値:False

-Overwrite

When specifying the zone using a DnsZone object (passed via the pipeline or Zone parameter), the zone is not deleted if it has been changed in Azure DNS since the local DnsZone object was retrieved (only operations directly on the DNS zone resource count as changes, operations on record sets within the zone do not). This provides protection for concurrent zone changes.

This can be suppressed using the Overwrite parameter, which deletes the zone regardless of concurrent changes.

パラメーターのプロパティ

型:SwitchParameter
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

Object
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-PassThru

passthru

パラメーターのプロパティ

型:SwitchParameter
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-ResourceGroupName

Specifies the name of the resource group that contains the zone to remove. You must also specify the ZoneName parameter.

Alternatively, you can specify the DNS zone using a DnsZone object, passed via either the pipeline or the Zone parameter.

パラメーターのプロパティ

型:String
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

Fields
配置:Named
必須:True
パイプラインからの値:False
プロパティ名別のパイプラインからの値:True
残りの引数からの値:False

-WhatIf

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

パラメーターのプロパティ

型:SwitchParameter
規定値:False
ワイルドカードのサポート:False
DontShow:False
Aliases:wi

パラメーター セット

(All)
配置:Named
必須:False
パイプラインからの値:False
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

-Zone

Specifies the DNS zone to delete. The DnsZone object passed can also be passed via the pipeline.

Alternatively, you can specify the DNS zone to delete by using the ZoneName and ResourceGroupName parameters.

パラメーターのプロパティ

型:DnsZone
規定値:None
ワイルドカードのサポート:False
DontShow:False

パラメーター セット

Object
配置:Named
必須:True
パイプラインからの値:True
プロパティ名別のパイプラインからの値:False
残りの引数からの値:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

入力

DnsZone

You can pipe a DnsZone object to this cmdlet.

出力

None

This cmdlet does not generate any output.

メモ

Due to the potentially high impact of deleting a DNS zone, by default, this cmdlet prompts for confirmation if the $ConfirmPreference Windows PowerShell variable has any value other than None.

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.