Answered by:
To get the list of All DNS, DFS and DHCP servers in domain?

Question
-
How Can I get the list of all DNS, DHCP and DFS servers in AD domain with any query, free tool or script ?
- Edited by Mr. Raj Monday, December 3, 2012 7:24 PM
Monday, December 3, 2012 7:23 PM
Answers
-
For getting the DHCP server list
netsh dhcp show server
For getting the DNS server list
dsquery server -limit 0
Best regards Biswajit Biswas Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. MCP 2003,MCSA 2003, MCSA:M 2003, CCNA, MCTS, Enterprise Admin
Tuesday, December 4, 2012 3:38 AM -
For getting the DNS server list
dsquery server -limit 0
Unfortunately, that will only get you all DCs in a domain.
.
To find all the DNS servers in a forest or domain, here are a few methods:
NLTEST command:
- nltest /dnsgetdc:<forestname.com>
- nltest /dnsgetdc:<domainName.com>
.
NSLOOKUP command:
- nslookup
- set ns
- domain.com
- This will list all the nameserver records authoritive for a domain. This may not be 100% accurate, depending if there are old servers in the nameserver list that may have been orphaned, IPs were changes, etc, and weren't cleaned up. Run DNSLINT first to check nameserver accuracy, and if it returns unknown servers, remove them from the Nameservers list under the zone's properties, Nameserver tab.
.
Powershell script
- The Official Scripting Guys Forum!
http://social.microsoft.com/Forums/en-US/ITCG/thread/34ed6cba-7698-4aa8-b13c-8693081296ef
.
Other suggestions:
List all DNS servers in an AD Forest
http://social.technet.microsoft.com/Forums/en-US/winserverDS/thread/8a3b2760-7e98-4e93-9e33-1f47e0e4cdb0/.
Script to find all DC's,DHCP,Wins and DNS Servers in the domain.
Some good suggestions here. However, you might need an account to view this. If you don't have one, simply copy the link below, paste it in a BING or GOOGLE search, and click on the first result)
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Q_22814910.html.
PS script to perform enterprise DNS health check
http://gallery.technet.microsoft.com/scriptcenter/PS-script-to-perform-DNS-bf8eee66.
List Name Server DNS Records (similar to the NSLOOKUP command mentioned above)
http://gallery.technet.microsoft.com/scriptcenter/00943a75-fce6-4cb1-b77e-e047a2f57166.
Other DNS scripts at the Official Scripting Guys:
http://gallery.technet.microsoft.com/scriptcenter/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value=networking&f%5B0%5D.Text=Networking&f%5B1%5D.Type=SubCategory&f%5B1%5D.Value=dnsserver&f%5B1%5D.Text=DNS%20Server&pageIndex=1
Ace Fekay
MVP, MCT, MCITP/EA, MCTS Windows 2008/R2 & Exchange 2007, Exchange 2010 EA, MCSE & MCSA 2003/2000, MCSA Messaging 2003
Microsoft Certified Trainer
Microsoft MVP - Directory Services
Technical Blogs & Videos: http://www.delawarecountycomputerconsulting.com/This post is provided AS-IS with no warranties or guarantees and confers no rights.
- Edited by Ace Fekay [MCT] Tuesday, December 4, 2012 5:25 AM - clarification
- Proposed as answer by Aiden_Cao Wednesday, December 5, 2012 2:58 AM
- Marked as answer by Aiden_Cao Friday, December 7, 2012 4:18 AM
Tuesday, December 4, 2012 5:23 AM
All replies
-
For getting the DHCP server list
netsh dhcp show server
For getting the DNS server list
dsquery server -limit 0
Best regards Biswajit Biswas Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. MCP 2003,MCSA 2003, MCSA:M 2003, CCNA, MCTS, Enterprise Admin
Tuesday, December 4, 2012 3:38 AM -
For getting the DNS server list
dsquery server -limit 0
Unfortunately, that will only get you all DCs in a domain.
.
To find all the DNS servers in a forest or domain, here are a few methods:
NLTEST command:
- nltest /dnsgetdc:<forestname.com>
- nltest /dnsgetdc:<domainName.com>
.
NSLOOKUP command:
- nslookup
- set ns
- domain.com
- This will list all the nameserver records authoritive for a domain. This may not be 100% accurate, depending if there are old servers in the nameserver list that may have been orphaned, IPs were changes, etc, and weren't cleaned up. Run DNSLINT first to check nameserver accuracy, and if it returns unknown servers, remove them from the Nameservers list under the zone's properties, Nameserver tab.
.
Powershell script
- The Official Scripting Guys Forum!
http://social.microsoft.com/Forums/en-US/ITCG/thread/34ed6cba-7698-4aa8-b13c-8693081296ef
.
Other suggestions:
List all DNS servers in an AD Forest
http://social.technet.microsoft.com/Forums/en-US/winserverDS/thread/8a3b2760-7e98-4e93-9e33-1f47e0e4cdb0/.
Script to find all DC's,DHCP,Wins and DNS Servers in the domain.
Some good suggestions here. However, you might need an account to view this. If you don't have one, simply copy the link below, paste it in a BING or GOOGLE search, and click on the first result)
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Q_22814910.html.
PS script to perform enterprise DNS health check
http://gallery.technet.microsoft.com/scriptcenter/PS-script-to-perform-DNS-bf8eee66.
List Name Server DNS Records (similar to the NSLOOKUP command mentioned above)
http://gallery.technet.microsoft.com/scriptcenter/00943a75-fce6-4cb1-b77e-e047a2f57166.
Other DNS scripts at the Official Scripting Guys:
http://gallery.technet.microsoft.com/scriptcenter/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value=networking&f%5B0%5D.Text=Networking&f%5B1%5D.Type=SubCategory&f%5B1%5D.Value=dnsserver&f%5B1%5D.Text=DNS%20Server&pageIndex=1
Ace Fekay
MVP, MCT, MCITP/EA, MCTS Windows 2008/R2 & Exchange 2007, Exchange 2010 EA, MCSE & MCSA 2003/2000, MCSA Messaging 2003
Microsoft Certified Trainer
Microsoft MVP - Directory Services
Technical Blogs & Videos: http://www.delawarecountycomputerconsulting.com/This post is provided AS-IS with no warranties or guarantees and confers no rights.
- Edited by Ace Fekay [MCT] Tuesday, December 4, 2012 5:25 AM - clarification
- Proposed as answer by Aiden_Cao Wednesday, December 5, 2012 2:58 AM
- Marked as answer by Aiden_Cao Friday, December 7, 2012 4:18 AM
Tuesday, December 4, 2012 5:23 AM