ping -a w.x.y.z

Should resolve the name from the IP address if the reverse lookup zone has been set up properly. If the reverse lookup zone does not have an entry for the record, the -a will just ping without a name.

Answer from Peter on serverfault.com
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ windows-server โ€บ administration โ€บ windows-commands โ€บ nslookup
nslookup | Microsoft Learn
Reference article for the nslookup command, which displays information that you can use to diagnose Domain Name System (DNS) infrastructure.
Discussions

Quickly determine what Windows process or program is making DNS queries
Will have to check it out, NirSoft makes great tools. I've been using BlueScreenView for years. More on reddit.com
๐ŸŒ r/pihole
19
131
August 12, 2021
How to query a URL (DNS lookup) using Windows terminal? - Stack Overflow
I am trying to use Windows' command line in order to query http:BL using their API (link) but can't seem to fine a command to do what I want. I thought I should use something like: ping secretkey... More on stackoverflow.com
๐ŸŒ stackoverflow.com
How to check my dns server on windows 11
In the command prompt: ipconfig /all | findstr /R "DNS\ Servers" or echo exit | nslookup or powershell Get-DnsClientServerAddress More on reddit.com
๐ŸŒ r/ipv6
5
0
May 31, 2024
How Windows DNS actually works
Corporate DNS 101. Nothing in your network should talk to external DNS except your DNS servers. The firewall should be blocking it since it's a known way for malware/spyware to exfil data (The malware sends data chucks over the DNS port to avoid detection). More on reddit.com
๐ŸŒ r/sysadmin
112
358
August 6, 2024
๐ŸŒ
Intermedia
support.intermedia.com โ€บ app โ€บ articles โ€บ detail โ€บ a_id โ€บ 24552 โ€บ ~ โ€บ how-do-i-use-the-nslookup-tool-in-the-command-prompt-or-terminal
How Do I Use The NSLOOKUP Tool In The Command Prompt Or Terminal?
Type nslookup and hit Enter. The displayed information will be your local DNS server and its IP address. You can specify the DNS server (IP address), type of record, and domain name. Note: all the screenshots below are for Windows OS but the same commands will work in Terminal for Mac.
๐ŸŒ
DigiCert
digicert.com โ€บ blog โ€บ dns-commands-for-windows
DNS Commands for Windows | DigiCert
April 18, 2023 - If you have an IP address and need the domain name, you can do a reverse DNS lookup. This is the same as the above example, just inโ€”you guessed itโ€”reverse: ... Letโ€™s say you want to find the nameserver for a domain or set a specific parameter in your command line. For this, you would use the Windows set command.
๐ŸŒ
Active Directory Reporting Tool
activedirectorypro.com โ€บ use-nslookup-check-dns-records
How to Use Nslookup Windows Command (11 Examples) - Active Directory Pro
July 14, 2025 - In this tutorial, you will learn how to use nslookup to check DNS records. Iโ€™ll show you how to check several DNS record types (A, PTR, CNAME, MX, etc) by using the windows nslookup command.
๐ŸŒ
NirSoft
nirsoft.net โ€บ utils โ€บ dns_lookup_view.html
DNS Lookup Viewer for Windows 10 and Windows 11
DNSLookupView is a DNS tracing tool for Windows 10 and Windows 11 that allows you to view the details of every DNS query sent through the DNS Client service of Windows.
Find elsewhere
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ windows-server โ€บ networking โ€บ dns โ€บ queries-lookups
DNS Queries and Lookups in Windows and Windows Server | Microsoft Learn
March 24, 2025 - Learn about DNS queries and lookups in Windows and Windows Server, including recursion, iteration, and the DNS query process.
๐ŸŒ
Rackspace
docs.rackspace.com โ€บ docs โ€บ nslookup-checking-dns-records-on-windows
Check DNS records on Windows with nslookup
To access nslookup, open a command prompt window by selecting Start > All Programs > Accessories > Command Prompt. To check a specific DNS record, you need to specify the nslookup command, an optional record type (for example, A, MX, or TXT), ...
๐ŸŒ
Infrasos
infrasos.com โ€บ home โ€บ blog โ€บ how to use reverse dns lookup command on windows
How to Use Reverse DNS Lookup Command on Windows
July 22, 2024 - In other words, when you run a reverse DNS lookup command on a Windows PC (or other computers), the command will not return a result if the authoritative server for that website (hostname) does not have a PTR record.
๐ŸŒ
NSLookup
nslookup.io
DNS Lookup
Find all DNS records for a domain name with this online tool. Nslookup shows A, AAAA, CNAME, TXT, MX, SPF, NS, SOA and more.
Top answer
1 of 2
11

Enable Debug Logging on the DNS server for this.

  1. Open DNS Manager from the Tools menu of Server Manager
  2. Right-click the DNS server in the left pane and click Properties
  3. Click the Debug Logging tab and check the Log packets for debugging checkbox
  4. To minimize the amount of data being logged, uncheck the following checkboxes:
    • Packet direction - Outgoing
    • Transport protocol - TCP
    • Packet contents - Updates
    • Packet type - Response
  5. In the Log file section, type a path and file name for the log. Alter the Maximum size (bytes) value if necessary.
  6. Click OK.

When the client queries the DNS server, you will see a line like the following in the log file (in this case the client performed a query for superuser.com):

16-07-2017 19:51:55 0DB4 PACKET  000000FA30FDFB60 UDP Rcv 10.10.10.100    000a   Q [0001   D   NOERROR] A      (9)superuser(3)com(0)

The IP address after Rcv (10.10.10.100) is the IP address of the client that performed the query.

REMEMBER to disable Debug Logging on the DNS server when it is no longer needed, as it can affect the performance of the server.


DNS Logging and Diagnostics

2 of 2
1

We have been able to use this to log DNS activity on our DCs. We paired it with hourly log rotation based upon information found at http://support.moonpoint.com/blog/blosxom/2014/12/07#rotatednslog

We experienced issues with many of the DNS logs ending up as 0 byte files, and it didn't appear to be based upon activity because it could be in the middle of the night. I bumped up the DC from 4 to 6 GB RAM (kept 2 vCPU) and it hasn't been a problem for the 8 days since, so I think we're okay.

We store the logs on a dedicated volume in a NTFS compressed directory to save space. The size of each hourly log is ~ 300 MB before compression, and ~ 115 MB after NTFS compression.

๐ŸŒ
Reddit
reddit.com โ€บ r/pihole โ€บ quickly determine what windows process or program is making dns queries
r/pihole on Reddit: Quickly determine what Windows process or program is making DNS queries
August 12, 2021 -

Today I was trying to figure out what program was making so many blocked queries, Seems that I left uTorrent running in the background for day's and forgot it was still running.

In the screen shot above you will notice that all the queries were a success but the only queries that were allowed was actually Onedrive and the localhost of my Win 10 machine.

If your interested in this program it's called DNSLookupView.

http://www.nirsoft.net/utils/dns_lookup_view.html

DNSLookupView is a DNS tracing tool for Windows 10 that allows you to view the details of every DNS query sent through the DNS Client service of Windows. For every DNS query, the following information is displayed: Host Name, Query Type (A, AAAA, and so on), Query Status (Error or succeeded), Query Result, Query Timestamp, ID and name of the process that requested the DNS lookup.

Nirsoft makes several freeware tools you can check them out here

https://www.nirsoft.net/

More reading on DNSLookupView here

https://www.ghacks.net/2021/08/12/log-all-dns-activity-on-your-windows-pcs-with-dnslookupview/

๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ windows-server โ€บ networking โ€บ dns โ€บ reverse-lookup
DNS Reverse Lookups in Windows and Windows Server | Microsoft Learn
Applies to: โœ… Windows Server 2025, โœ… Windows Server 2022, โœ… Windows Server 2019, โœ… Windows Server 2016 ... In most DNS lookups, clients typically perform a forward lookup, which is a search based on the DNS name of another computer as stored in an address (A) RR.
๐ŸŒ
Cloudzy
cloudzy.com โ€บ home โ€บ linux tutorials โ€บ how to use nslookup commands in windows and linux
NsLookup Commands In Windows And Linux: A DNS Guide
February 23, 2025 - Just like getting the A record of a domain, type in nslookup followed by the Ip address to get the reverse ns lookup: ... Besides the command prompt, you can also use web-based options to query a name server.
Address ย  Khaled Mohammed Building, 22382, Dubai
(4.9)
๐ŸŒ
LinkedIn
linkedin.com โ€บ pulse โ€บ how-view-dns-windows-11-3-ways-corusinfotech
How to View DNS Settings in Windows 11: 3 Easy Ways
October 18, 2022 - Use the Control Panel to check DNS servers by following these steps: Use the Win + R hotkeys to launch the Run dialogue box. Type "Control Panel" into the search box and hit Enter. The Control Panel window will open.
๐ŸŒ
Reddit
reddit.com โ€บ r/sysadmin โ€บ how windows dns actually works
r/sysadmin on Reddit: How Windows DNS actually works
August 6, 2024 -

Spent all morning cleaning up a customers misconfigured corporate DNS setup that was causing all sorts of havoc on their network. It wasn't behaving the way they expected with their domain causing issues like not being able to access resources like printers or shares or it only working randomly.

The root issues is they were attempting to add an external DNS entry as a backup DNS to the desktops, and that's what broke everything. (the actual problem they were trying to resolve was that their DCs were too slow and weren't reliable enough due to a hardware problem that we've now fixed)

It's a common misconception that in Windows the DNS entries on the network adapters are active/passive when that's not actually the default behavior. It's actually more akin to a broadcast, if the primary DNS doesn't answer then Windows doesn't just send the request to the secondary, it will send the request to ALL DNS servers on adapters and see who responds.

If you have an external DNS like 8.8.8.8 listed as secondary or tertiary it can cause problems with the Domain. If the external DNS responds more quickly than your Domain Controllers (which was the case here) then windows will start prioritizing sending requests to that external DNS server instead of to the DCs.

Since this customers AD domain is the same as their website, the external DNS would respond with a public IP instead of the IP of the servers internally. That response then gets added to the DNS cache on the machine and stays there until it times out or is cleared.

Domain joined PCs should never use external DNS on their adapters, if you need redundancy you should have 2 Domain Controllers instead. (unless you're working remote obviously, but even then the VPN should force the machine to use internal DNS)

From the documentation:

https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd197552(v=ws.10)?redirectedfrom=MSDN

The DNS Client service queries the DNS servers in the following order:

  1. The DNS Client service sends the name query to the first DNS server on the preferred adapterโ€™s list of DNS servers and waits one second for a response.

  2. If the DNS Client service does not receive a response from the first DNS server within one second, it sends the name query to the first DNS servers on all adapters that are still under consideration and waits two seconds for a response.

  3. If the DNS Client service does not receive a response from any DNS server within two seconds, the DNS Client service sends the query to ALL DNS servers on ALL adapters that are still under consideration and waits another two seconds for a response.

  4. If the DNS Client service still does not receive a response from any DNS server, it sends the name query to all DNS servers on all adapters that are still under consideration and waits four seconds for a response.

  5. If it the DNS Client service does not receive a response from any DNS server, the DNS client sends the query to all DNS servers on all adapters that are still under consideration and waits eight seconds for a response.

If the DNS Client service receives a positive response, it stops querying for the name, adds the response to the cache and returns the response to the client.

If the DNS Client service has not received a response from any server within eight seconds, the DNS Client service responds with a timeout. Also, if it has not received a response from any DNS server on a specified adapter, then for the next 30 seconds, the DNS Client service responds to all queries destined for servers on that adapter with a timeout and does not query those servers.

If at any point the DNS Client service receives a negative response from a server, it removes every server on that adapter from consideration during this search. For example, if in step 2, the first server on Alternate Adapter A gave a negative response, the DNS Client service would not send the query to any other server on the list for Alternate Adapter A.

The DNS Client service keeps track of which servers answer name queries more quickly, and it moves servers up or down on the list based on how quickly they reply to name queries.