I would like to update or modify existing multiple DNS 'A' type records with same one private IP address using powershell.
Can someone help me or advise me on this please, would be a great help. Thank you.
So far I tried by running below command to update/modify existing one DNS A type record not multiple DNS records using same PIP.
$rs = Get-AzDnsRecordSet -Name $dnsrecordname –ZoneName "$zone" -ResourceGroupName "$dnsrg" -RecordType A
$rs.Records[0].Ipv4Address = "$ipAddress"
$setdnsrecord=Set-AzDnsRecordSet -RecordSet $rs
$dnsrecordname this variable has only one DNS record name, so now I want to update/modify DNS records where I have more than 3 records.
Do you mean you essentially have current records of :
and you want to change that to :
If so then that's not possible as you can't have more than one identical record. foo.domain.com can point to multiple IP addresses, and multiple hosts can point to the same IP address.
If not then can you elaborate what it is you're trying to achieve?