How to Add Multiple DNS Entry via CSV/TXT
File format
DNS Entry – A Record
Import-Csv C:\Users\Administrator\Desktop\dnsarecords.csv
| foreach{Add-DnsServerResourceRecordA -Name
$_.name
-ZoneName abc.local
-IPv4Address $_.ip -ComputerName
DC1}
If you want to add records to the Reverse Lookup Zone at the same time,
Add the –CreatePtr
For the PTR
Record
Import-Csv C:\Users\Administrator\Desktop\dnsarecords.csv
| foreach{Add-DnsServerResourceRecordA -Name
$_.name
-ZoneName abc.local
-IPv4Address $_.ip -ComputerName
DC1 –CreatePtr
}
No comments:
Post a Comment