Configuring Zone Transfers using DNSCMD

Configuring Zone Transfers using DNSCMD

While setting up a lab within Azure I’ve done some work on DNS and how to script parts of during setup and apply changes after setup. Although DNSCMD is marked as a something Microsoft might remove in future versions of Windows I’ve been using it to make some changes within my environment.
In my examples below I’ve used “” as my zone name, please replace accordingly for your use.
The following command will allow zone transfers to happen to any server

dnscmd /zoneresetsecondaries /nonsecure

This command will stop any transfers of the zone from happening

dnscmd /zoneresetsecondaries /noxfr

This command will allow transfer to the servers within the zone transfer list only

dnscmd /zoneresetsecondaries /secure