Link to home
Start Free TrialLog in
Avatar of Thor2923
Thor2923Flag for United States of America

asked on

A Script to get all DNS IPs and show the server names they are pointing to

I need to create a script that will grab all DNS IP's, show all server names and what they are pointing to. Does anyone have any ideas? I would prefer powershell only because I have used it more but any other idea is welcome..thanks
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

I'm a little confused.  Are you wanting to point to a DNS server and dump everything  it knows about?

I would start with Get-DnsServerZone and then Get-DnsServerResourceRecord

There are a few examples here:
http://sigkillit.com/2015/10/27/list-all-dns-records-with-powershell/
If you are just trying to get a map of hostnames to IPs for a known subnet, why not just use nmap and scan the network and option for resolution?
Avatar of Thor2923

ASKER

yes slightwv (䄆 Netminder) I am trying to get as much DNS info as possible into a report. I was in a meeting and wrote down what was said on the fly. Right now I am just getting comfortable with running the Powershell commands and learning to generate output
SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
it appears to run but I cannot find the output. I am playing with Syntax to just get it to output to something like C:\temp\DNS.txt
do u have the proper syntax for the last line of the 3 option?  the $Zone.Zonename does not seem to create anything I can find
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial