Solved

Import DNS txt file into Windows DNS Server

Posted on 2008-10-08
6
9,632 Views
Last Modified: 2012-05-05
In my company we have thousands of switches and routers with unique host names and I have list with all the host names and IP addresses that are in only 1 servers host file.  I wanted to import this host file into my 2 Windows Domain Controllers running DNS.  How do I import a TXT or CSV (either or) file into a Windows DNS server?
0
Comment
Question by:Ensilence
6 Comments
 
LVL 18

Expert Comment

by:sk_raja_raja
ID: 22672462
0
 
LVL 23

Expert Comment

by:bhanukir7
ID: 22672789
Hi,

i think this post on MS can help you. This post talks about reverse address zone but you can get help for  you text file by using the DNS import export tool

http://blogs.msdn.com/richpec/archive/2008/08/24/how-to-consolidate-many-reverse-dns-zones-into-fewer-larger-reverse-dns-zones.aspx

or use this which talks about importing text file to unix DNS (BINDS) and then importing that to windows dns server.



http://www.eggheadcafe.com/forumarchives/windowsserverdns/Aug2005/post23676167.asp

bhanu
0
 
LVL 70

Accepted Solution

by:
Chris Dent earned 250 total points
ID: 22673054

> I wanted to import this host file into my 2 Windows Domain Controllers running DNS.  
> How do I import a TXT or CSV (either or) file into a Windows DNS server?

It actually works really easily using DNSCMD, a bit of playing in Excel and the drag down.

DNSCMD from the support tools has a /RecordAdd option we can use. All you have to do in Excel is complete the command :)

e.g.

Column A (RecordAdd and domain)
DNSCMD /RecordAdd youdomain.com

Column B (Name)
"Host Name"

Column C (Record Type)
A

Column D (IP Address)
1.2.3.4

Drag down columns A and C. Paste into Notepad, now you have have a batch file that can add all the records for you :)

If that's no good, there are scripting methods we can use for the more automated approach :)

Chris
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 23

Expert Comment

by:bhanukir7
ID: 22673181
Hi Chris

That seems to be the easiest way.  Hope this would be helpful to the asker too.

bhanu
0
 

Author Comment

by:Ensilence
ID: 22674169
Chris,

I will take a look at what the DNSCMD is and how it can help me.  Right now what I am working with is a users host file from the drivers\etc dir and has all the host names and IPs populated.  Like:
10.45.1.254   Site45rtr01
10.46.1.254   Site46rtr01
10.47.1.254   Site47rtr01
10.48.1.254   Site48rtr01
10.49.1.254   Site49rtr01
10.50.1.254   Site50rtr01
10.52.1.254   Site51rtr01

My Excell skills are old but you can teach this dog new tricks.  I will look at what you suggested about using Excel but I am wondering if there was an easier way to import this lame TXT file list into DNS and populate the A records etc. I am currently using or looking at dnsmgmt console.  Kind of clueless to this function I want to perform.  Limited research online had suggested editing a .DNS file or something...?  Any more words would likely be greatly appreciated.  
0
 
LVL 70

Expert Comment

by:Chris Dent
ID: 22676423

There's nothing simple in the DNS console that will let you I'm afraid.

If your zone were not AD Integrated you would have a text file for the zone file, that's the one with the .dns extension it would have hidden in %SystemRoot%\System32\DNS\. AD Integration moves that data into Active Directory itself as objects we won't be able to write directly.

We can, of course, write a script to rip apart the text file and construct the relevant records for us. And we could use WMI to add those in, it's not difficult if you're experienced with the interface at all.

However, using DNSCMD and the method described above will give you a much easier view of the changes if you aren't familiar with the scripting interfaces (either VbScript or PowerShell if I'm doing it).

I'm more than happy to show you the scripted methods if you prefer those :)

Chris
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

Suggested Solutions

Have you considered what group policies are backwards and forwards compatible? Windows Active Directory servers and clients use group policy templates to deploy sets of policies within your domain. But, there is a catch to deploying policies. The…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now