How To Create An Azure DNS Zone And Record Using PowerShell

Azure DNS Zones is a quick and easy alternative to running your own DNS server and opening it up to the internet. In this example, we look at creating a new DNS Zone to host our domain name and look at adding records to the domain. We use cmdlets like New-AzureRmDnsZone and New-AzureRmDnsRecordSet to create the new zone and records, and then test that they resolve. Then we move on to removing the zone and records using the Remove-AzureRmDnsRecordSet and Remove-AzureRmDnsZone cmdlets. By the end, we should have enough to automate the creation of our zones/record and remove them once they are done with.

Prerequisites include: AzureRM PowerShell modules loaded.