Link to home
Start Free TrialLog in
Avatar of nav2567
nav2567Flag for United States of America

asked on

script to read a file and populate DNS records to a domain.

Hello,

I am trying the below command to populate list of new DNS records (A records) to a test DNS domain and it is not successful.


for /f "tokens=1-2" %i in (C:\newhosts.txt) do dnscmd %LOGONSERVER% /RecordAdd test.com %i A %j

The newhosts.txt file I have contains the following:

host1 10.20.30.40  
host2 11.22.33.44  
host3 12.24.36.48

Please advise if I have missed something.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nav2567

ASKER

Got it.  

Thank you!!!