Re: nslookup and dnscmd help

Tech-Archive recommends: Speed Up your PC by fixing your registry



"Microsoft" <me@xxxxxxxx> wrote in message
news:eUM3SnFzGHA.4580@xxxxxxxxxxxxxxxxxxxxxxx
This will list all records in all zones on your dns server. You'll get
several errors at the start but if you redirect this into a text file,
that will be easy enough to clean up.

for /f %a in ('dnscmd 10.0.0.1 /EnumZones') do dnscmd 10.0.0.1 /Zoneprint
%a

Sweet.

Here is the cleanup to get only MX records, use your redirect to
text file (and thus avoid any error messages too):

for /f %a in ('dnscmd 127.0.0.1 /EnumZones') do dnscmd 127.0.0.1 /Zoneprint
%a | findstr /R "\<MX\>" >>mx.txt

Those quotes around "\<MX\>" are necessary to avoid the Begin
Work < and End Word > being taken as (more) redirection.

This finds all records in all zones that have MX -- it could conceivable
mess up slightly if you had a server named MX.something.com or even
MX-123.something.com

(so don't do that <grin>)

Unfortunately it would also mess up if you zone were under the Mexico
hierarchy. <sigh>

But that could fixed by better Regular Expressions probably.
(You might need Grep or Awk to do that however.)

--
Herb Martin, MCSE, MVP
Accelerated MCSE
http://www.LearnQuick.Com
[phone number on web site]


"NoBoDy" <NoWaY@xxxxxxxxxxx> wrote in message
news:u7gOAZFyGHA.4392@xxxxxxxxxxxxxxxxxxxxxxx
Hello all

I am trying to list all MX records in all zones running on a dns server.

By using 'ls -t mx name of zone' from nslookup or 'dnscmd /enumrecords
name of zone . /type mx' from dnscmd I can get a list of all MX records
for a specific zone.

But how can I expand these commands to get a list of MX records for all
zones running on a dns server not just for a specific zone?

Regards





.



Relevant Pages

  • Re: Open File Security Warning
    ... Thank You....I also had to use GP to import the added zone to the user ... > MCSE,CCEA, Microsoft MVP - Terminal Server ... >> used group policy to redirect the users start menu so all users ... >> prompts them with an Open Program Security Dialog Box whenever ...
    (microsoft.public.win2000.termserv.apps)
  • Re: Two Netscreen Questions
    ... up to redirect several ports to machines on my DMZ zone (in the ... Just set up the VIP like you ...
    (comp.security.firewalls)
  • Re: doesnt redirect
    ... That is where security zones are defined. ... One of them is called the Internet zone and probably the one you are using. ... are used in the Medium level. ... just WHAT type of redirect are you asking ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • nslookup and dnscmd help
    ... I am trying to list all MX records in all zones running on a dns server. ... /type mx' from dnscmd I can get a list of all MX records for a ... specific zone. ...
    (microsoft.public.windows.server.dns)
  • Re: Vista clients became unresponsive after network move
    ... Then was mentioned that DHCP wasn't used, ... The computers detected a new ... reverse zone. ... 11/5 - DNS server has started ...
    (microsoft.public.windows.server.networking)