Solved

Export list of name servers

Posted on 2010-11-18
3
1,174 Views
Last Modified: 2012-05-10
We have 14 DNS zones, each with a list of 20 - 30 name servers in the zone properties. I need to list all of the name servers for each DNS zone, so we can try to clear out some of the legacy servers.

Is there a quick way to export the name servers list, without having to go through each one on the list, and copy & paste it individually into a text file?
0
Comment
Question by:bjblackmore
[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
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
Rich Weissler earned 500 total points
ID: 34164492
Create a text file with the following contents:
set type=NS
<zone1>
<zone2>
.
.
.
<zone14>
exit

from the CMD prompt, "nslookup <filename >outputtxtfile.txt"

Does that give you what you were looking for?
0
 
LVL 30

Expert Comment

by:Rich Weissler
ID: 34164588
And just to make certain the command line syntax is clear...  you are redirecting in with '<' the commands to nslookup, and you are getting the output to a text file via the redirector '>'.
For my test here, I created a file called temp.txt and put the set type command and zone list in... so when I ran the command, it looked like this:
nslookup <temp.txt >output.txt
0
 

Author Comment

by:bjblackmore
ID: 34164758
Hi,

Yes just ran it, and it worked perfectly! One thing I did notice was the number, and order of the nameserver list, and internet address don't always match. i.e.

uk.domain.com nameserver = ns01.uk.net
ns01.uk.net      internet address = 10.0.0.20

My first zone had 54 name server records, but only 50 IP addresses, and the order didn't match. owever this isn't important, as I'm only interested in the name server names, not IP addresses, but it's worth noting!

Many thanks, you have saved me many laborious hours of copy & pasting!
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Active Directory security has been a hot topic of late, and for good reason. With 90% of the world’s organization using this system to manage access to all parts of their IT infrastructure, knowing how to protect against threats and keep vulnerabil…
Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
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 …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

617 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