profile for Hannel on Stack Exchange, a network of free, community-driven Q&A sites
Project Work Hours
Sat & Sun 6am - 9am
Subscribe via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.


This article covers the operation of a custom script that will copy supported DNS records from a Windows DNS server into AzureDNS. The script will search the specified DNS Zone on a Windows DNS Server for supported Azure DNS records (MX,A,AAAA,SRV,TXT,CNAME & PTR) and copy those record over to AzureDNS. This script should only be used for initial copy as it will try to create new DNS Zone in Azure and if that fail because DNS Zone is already in Azure script will terminate. Requirements for running script are;

  1. Access to windows DNS Server
  2. Azure Global Admin Account
  3. Windows PowerShell 4.0+
  4. Azure PowerShell 3.0+
Copying Windows DNS Zone to AzureDNS

Copying Windows DNS Zone to AzureDNS



Please always review content of scripts before running. Steps in script;

  1. Get DNS records from Windows DNS Server
  2. Login to Azure and Select subscription
  3. Check for or create Resource group
  4. Create Azure DNS Zone
  5. Add records to newly created Azure DNS Zone

From time to time I update scripts to make them more effective, so see file history in GitHub.

This script can be found on GitHub, link below;


2C Series