How to import/export DNS zone file to Azure DNS using CLI

Login to Azure using CLI

az login

az account set -s <Subscription Name>

To Import Zone File:-
az network dns zone import -g <ResourceGroupName> -n <ZoneName> -f  <ZoneFileFullPath>

To Test imported zone file:-
az network dns record-set list -g <ResourceGroupName> -z <ZoneName>

Leave a Reply

Your email address will not be published. Required fields are marked *