Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Import DNS txt file into Windows DNS Server

Posted on 2008-10-08
6
Medium Priority
?
11,972 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 71

Accepted Solution

by:
Chris Dent earned 750 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
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
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 71

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Group policies can be applied selectively to specific devices with the help of groups. Utilising this, it is possible to phase-in group policies, over a period of time, by randomly adding non-members user or computers at a set interval, to a group f…
Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
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 to another domain controller. Log onto the new domain controller with a user account t…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

721 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