The Set-AzDnsZone cmdlet updates the specified DNS zone in the Azure DNS service.
This cmdlet does not update the record sets in the zone.
You can pass a DnsZone object as a 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 passing a DNS zone as an object (using the Zone object or via the pipeline), it is not updated
if it has been changed in Azure DNS since the local DnsZone object was retrieved. This provides
protection for concurrent changes. You can suppress this behavior with the Overwrite parameter,
which updates the zone regardless of concurrent changes.
The first command gets the zone named myzone.com from the specified resource group, and then stores
it in the $Zone variable.
The second command updates the tags for $Zone.
The final command commits the change.
This command associates the Private DNS zone myprivatezone.com with the virtual network myvnet as a registration network
by passing the virtual network object represented by $vnet variable to the Set-AzDnsZone cmdlet.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
When passing a DNS zone as an object (using the Zone object or via the pipeline), it is not updated
if it has been changed in Azure DNS since the local DnsZone object was retrieved. This provides
protection for concurrent changes. You can suppress this behavior with the Overwrite parameter,
which updates the zone regardless of concurrent changes.
Specifies the name of the resource group that contains the zone to update.
You must also specify the ZoneName parameter.
Alternatively, you can specify the zone using a DnsZone object with the Zone parameter or the pipeline.
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.
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.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.