Greetings,
I am trying to use the following Powershell code to bulk import DNS A records into Windows 2008 DNS:
Import-Csv .\thosts.csv | foreach{Add-DnsServerResourceRecordA -Name $_.name -ZoneName xxxxx.com -AllowUpdateAny -CreatePtr -IP $_.ip -Computername xxxxxxx}
My CSV file looks like this:
Name, IP
ABQVMP01, 130.77.129.237
It runs successfully, but the DNS name ends up being ABQVMP01.xxxxx.com.xxxxx.com, instead of ABQVMP01.xxxxx.com. I have looked for something to control this in the command syntax, but do not see anything:
We are running AD and DNS at the 2008 level. Powershell is version 5.1. I am running this as a domain admin.
Thanks in advance and happy to answer any more questions,
Rick
I am trying to use the following Powershell code to bulk import DNS A records into Windows 2008 DNS:
Import-Csv .\thosts.csv | foreach{Add-DnsServerResourceRecordA -Name $_.name -ZoneName xxxxx.com -AllowUpdateAny -CreatePtr -IP $_.ip -Computername xxxxxxx}
My CSV file looks like this:
Name, IP
ABQVMP01, 130.77.129.237
It runs successfully, but the DNS name ends up being ABQVMP01.xxxxx.com.xxxxx.com, instead of ABQVMP01.xxxxx.com. I have looked for something to control this in the command syntax, but do not see anything:
We are running AD and DNS at the 2008 level. Powershell is version 5.1. I am running this as a domain admin.
Thanks in advance and happy to answer any more questions,
Rick