Instantly share code, notes, and snippets.

Embed
What would you like to do?
#Bulk Import A Records
Import-CSV -Path "C:\scripts\arecords.csv" | ForEach-Object { New-AzureRmDnsRecordSet -Name $_.Name -RecordType $_.RecordType -ZoneName $_.ZoneName -ResourceGroupName $_.ResourceGroupName-Ttl $_.TTL -DnsRecords (New-AzureRmDnsRecordConfig -IPv4Address $_.Value) }
#Bulk Import CNAME Records
Import-CSV -Path "C:\scripts\cnamerecords.csv" | ForEach-Object { New-AzureRmDnsRecordSet -Name $_.Name -RecordType $_.RecordType -ZoneName $_.ZoneName -ResourceGroupName $_.ResourceGroupName-Ttl $_.TTL -DnsRecords (New-AzureRmDnsRecordConfig -Cname $_.Value) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment