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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

https://www.wireshark.org/
0

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
footechCommented:
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
2
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. 192.168.15.1)
type \\server\share\*.txt  | find /i "192.168.15.1."
1
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

footechCommented:
There's a caveat with #4 above - Get-DNSClientServerAddress is only available on Win8 and newer.
0
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.
0
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...

computer1
computer2
computer3

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.
0
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.