Finding machines using a specific DNS server

Is there a way to find out what machines are using a specific DNS server? We are switching servers and want to make sure any static assigned machines are not using the old servers anymore.
Thomas NSystems Analyst - Windows System AdministratorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Edward PamiasTeam Lead RRS DeskCommented:
On the Microsoft site the recommended the WireShark Utility. See link below.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
There's a few ways.
 - enable logging on the DNS server.  After a while, check the logs to see which machines have contacted it.
 - run a network capture on the DNS server and filter on DNS traffic
 - script something that will check the NIC settings on a list of client machines you provide
Mohammed KhawajaManager - Infrastructure:  Information TechnologyCommented:
Ways you could do it:

1.  Protocol analyzer (MS Network Monitor, WireShark, etc.)
2.  DNS logging and review log files
3.  Use a utility such as SpiceWorks, Zabbix, LanSweeper to identify network settings
4.  Easiest way to do it would be to have a GPO which is a computer policy and it runs a powershell as per below:
get-dnsclientserveraddress | out-file \\server\share\$env:computername.txt

You could then run a DOS command on the all files to find a missing DNS server (i.e.
type \\server\share\*.txt  | find /i ""
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

There's a caveat with #4 above - Get-DNSClientServerAddress is only available on Win8 and newer.
Mohammed KhawajaManager - Infrastructure:  Information TechnologyCommented:
Good point, I run Windows 10 and didn't even think of OS supported by different versions.  What you could do is change the powershell command to "ipconfig /all > \\server\share\%computername%.txt

You would have to manually check each text file as if you do a find for string DNS, it will always give you the primary server name.  Secondary server name is in the next line.
Todd NelsonSystems EngineerCommented:
The script in this article should help...

Make sure you create a TXT (c:\scripts\computers.txt) file with all of your computer names listed.  I recommend running from a Windows 2012 R2 DC for best results.  May not run against all machine you list.

The computers.txt file should look something like this...


Open in new window

The command should look something similar to this...

Get-Content C:\Scripts\computers.txt | C:\Scripts\Get-IPDetails.ps1 | ft -auto

Open in new window

Good luck.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Active Directory

From novice to tech pro — start learning today.