Earlier today I needed to quickly create a bunch of DNS entries under my DNS Zone hosted in Azure DNS Service. Currently, there are three ways of creating/importing DNS records.
Azure Portal
Azure PowerShell
Azure CLI
Once again, PowerShell to the rescue!
Create a CSV file with the following information ( In my case I only needed to create only A records ).
Open an Elevated PowerShell Prompt and login to your Azure Subscription.
Run the following cmdlet ( alter the Path information ).
Import-CSV -Path "Path of the CSV File" | ForEach-Object { New-AzureRmDnsRecord
Set -Name $_.name -RecordType $_.RecordType -ZoneName $_.ZoneName -ResourceGroupName $_.ResourceGroupName
-Ttl $_.TTL -DnsRecords (New-AzureRmDnsRecordConfig -IPv4Address $_.IP) }
Hey there! I'm George Markou. The reason why I first started this blog about 6 years ago was to share thoughts and things I've been dealing with or working on during my day. By this, I feel I give more back to the community :)
Force Disk Rescan on a Windows Failover Cluster using PowerShell
Get Hyper-V Integration Services Version within a VM using PowerShell ( One-Liners )
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.
You must be logged in to post a comment.