Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Export list of name servers

Posted on 2010-11-18
3
Medium Priority
?
1,187 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
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
Rich Weissler earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Here's a look at newsworthy articles and community happenings during the last month.
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 from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

886 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