Solved

Export list of name servers

Posted on 2010-11-18
3
1,171 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

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

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

This article outlines the process to identify and resolve account lockout in an Active Directory environment.
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
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…

734 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