When I issue ipconfig /displaydns, I get a ton of output. I want to display the details for a specific domain name like google.com. My objective is something like this as output:
I tried ipconfig /displaydns | find "google.com", but this did not help me as it only displays the lines, not the section
2 Answers
Do ipconfig /displaydns > file.txt and use a text editor to find the entry.
I'd recommend PowerShell for this. Open PowerShell and type this command:
Get-DnsClientCache | ? { $_.Entry -eq "google.com" }You could also search partial matches using the -like operator:
Get-DnsClientCache | ? { $_.Entry -like "*google.com" }You can use Out-GridView (ogv) to open a pretty GUI window which will let you filter on any field as you type:
Get-DnsClientCache | ogv