How to List All DNS Servers in a Domain

CMD Method:

PS C:\Windows\system32> nslookup
Default Server:  dc02.intranet.kimconnect.com
Address:  10.20.10.10

> set type=ns
> intranet.kimconnect.com
Server:  dc05.intranet.kimconnect.com
Address:  10.50.10.10

intranet.kimconnect.com   nameserver = dc02.intranet.kimconnect.com
intranet.kimconnect.com   nameserver = dc03.intranet.kimconnect.com
intranet.kimconnect.com   nameserver = dc01.intranet.kimconnect.com
intranet.kimconnect.com   nameserver = dc04.intranet.kimconnect.com
intranet.kimconnect.com   nameserver = dc05.intranet.kimconnect.com
intranet.kimconnect.com   nameserver = dc06.intranet.kimconnect.com
dc01.intranet.kimconnect.com      internet address = 10.10.10.10
dc02.intranet.kimconnect.com      internet address = 10.20.10.10
dc03.intranet.kimconnect.com      internet address = 10.30.10.10
dc04.intranet.kimconnect.com      internet address = 10.40.10.10
dc05.intranet.kimconnect.com      internet address = 10.50.10.10
dc06.intranet.kimconnect.com      internet address = 10.60.10.10
> exit

PowerShell Method:

PS C:\Windows\system32> Resolve-DnsName intranet.kimconnect.com -type ns|?{$_.ip4address}

Name                                           Type   TTL   Section    IPAddress
----                                           ----   ---   -------    ---------
dc01.intranet.kimconnect.com                      A      3600  Additional 10.10.10.10
dc02.intranet.kimconnect.com                     A      3600  Additional 10.20.10.10
dc03.intranet.kimconnect.com                      A      3600  Additional 10.30.10.10
dc04.intranet.kimconnect.com                         A      3600  Additional 10.40.10.10
dc05.intranet.kimconnect.com                     A      3600  Additional 10.50.10.10
dc06.intranet.kimconnect.com                      A      1200  Additional 10.60.10.10

Leave a Reply

Your email address will not be published. Required fields are marked *