DNS

All posts tagged DNS

$DNSEntrys = import-csv “h:\dns.csv”
ForEach ($dns in $DNSEntrys){
$hostname = $($dns.hostname)
$ipaddress = $($dns.ipaddress)
Write-host $hostname $ipaddress
Add-DnsServerResourceRecordA -Name $hostname -IPv4Address $ipaddress -ZoneName contoso.com -ComputerName dc01 -CreatePtr
}