I found this Powershell script online,

@echo off
Powershell -noexit "ipconfig /displaydns | select-string 'Record Name' | foreach-object { $_.ToString().Split(' ')[-1]   } | Sort | Out-Gridview"

Is there a way to make this script display the date of the DNS history?


As per https://technet.microsoft.com/en-us/library/cc758108(v=ws.10).aspx and a quick test using just ipconfig /displaydns from command line, it does not keep any date or time stamp information in those entries in order for you to modify the Powerhhell query to bring back up results.

/displaydns | The command to display a client resolver cache.

The ipconfig /displaydns command provides you with a means to view the contents of the DNS client resolver cache, which includes entries preloaded from the local Hosts file, as well as any recently obtained resource records for name queries resolved by the system. This information is used by the DNS Client service to quickly resolve frequently queried names before it queries its configured DNS servers.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.