list all DNS servers

Posted on 2010-01-03
Last Modified: 2012-05-08
Dear All,

I am looking for a way to list all DNS servers I have and the type of zones inside each server?

Question by:Arabsoft-ACS
    LVL 70

    Expert Comment

    by:Chris Dent

    You can get a little by pulling the list of holders for ForestDNSZones. "nslookup" will do, you can look at the partition holders list as well. It's not exhaustive though, it will only tell you about 2003+ Domain Controllers running the DNS service.

    Beyond that, the only way would be to examine each server for the DNS service; WMI works, but it won't be fast if you have a large number of servers.

    Once you have the servers, types of zone can be found using WMI, or by using "dnscmd /EnumZones".

    LVL 18

    Accepted Solution

    by: would be easier with some more details:
    - Windows or Linux or Unix DNS?
    - how do you mean "...all DNS servers I have"? You mean, you do not know your own dns servers?
    - for which domain? Only 1 domain, or many domains?
    - is it local domain, Active Directory, or web domain(s)?

    Ok, but let's assume you have DNS somewhere hosted and you have your domain registered, and you did not do it yourself. And that you are corius about only 1 domain.

    First, let's dig all we can about your domain.
    Go to and click on DOMAIN DOSSIER.
    Enter your domain name and check all boxes.

    If you list results, down under DNS ZONE section you will find interesting data.
    What you need is:
    IN  NS  records, which tell you all DNS servers, which your domain is registered with
    IN  MX  records, which tell you which MAIL server receives mail for your domain

    Now, althrough you will see most important data here, you will NOT see all remaining A-records and other records here. For example, there might be a sub-domain "", which is technically most probably A-record (or CNAME record), which is not listed there. You could see it only if you directly query for that sub-domain name.

    You would be most probably interested into getting the whole DNS zone for your domain. But the whole DNS zone is most probably hard to retrieve, because zone transfers are most probably "locked" and allowed only between servers, listed as nameservers (IN NS part of zone). So you won't be able to retreive the whole zone in one pass.

    So you may play around in Windows with NSLOOKUP command line tool.
    Just start CMD command line, and type
    You are now inside NSLOOKUP program, and you may retreive zone data.

    Try this:
    set type=mx

    set type=all

    You may try with other types (A, MX, NS, CNAME) and learn about your domain.
    Hope it helps.
    LVL 70

    Expert Comment

    by:Chris Dent

    The author has a lot of posts in the AD areas about auditing, hence the MS assumptions in my original post :)

    LVL 18

    Expert Comment

    by:Andrej Pirman
    Hence the difference between your and mine answer, since I was "just passing by", looking the question only. Hope we covered any situation he was asking for :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Most DNS problems are VERY easily troubleshot and identifiable if you can follow the steps a DNS query takes. I would like to share the step-by-step a DNS query takes from the origin to the destination. _____________________________________________…
    One of the most often confused topics in the area DNS is the idea of GLUE records. Specifically, what they are, when they are needed, when they are provided, and how they are created. First, WHAT IS GLUE? To understand GLUE, you must first under…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    737 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

    18 Experts available now in Live!

    Get 1:1 Help Now