Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, December 26, 2018 7:13 PM
DNS Server - How to delete a specific cache entry?
I have a DNS Server with (maybe) millions of entries and I don´t want to delete all DNS Server cache
i´m looking for a tool like remove-dnsservercache or dnscmd, with a parameter to delete only a specific record
it´s possible?
something like: dnscmd /deletecacherecord olddomain.net
I know i can delete using the GUI, but i´m wondering if there is a tool i can use to do this by command line/script
All replies (7)
Wednesday, December 26, 2018 8:25 PM
Hello
tip:
show-DnsServerCache | where {$_.HostName -like "*index.hu*"} |Remove-DnsServerResourceRecord
sorry my english
Thursday, December 27, 2018 9:06 AM
Hi,
I'm sorry to say that based on my research, I haven't found a command to delete a specific cache entry.
Remove-DnsServerResourceRecord and dnscmd /recorddelete can only delete a resource record from a specified zone.
It seems that you have to delete them from the GUI.
For your reference:
Dnscmd
/en-us/windows-server/administration/windows-commands/dnscmd
Remove-DnsServerResourceRecord
/en-us/powershell/module/dnsserver/remove-dnsserverresourcerecord?view=win10-ps
Regards,
Zoe
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Thursday, December 27, 2018 10:45 AM
I´m not sure, maybe the "Remove-DnsServerResourceRecord" cmdlet only works on regular records, not on cache records
PS C:\Windows\system32> show-DnsServerCache | where {$_.HostName -like "*update.xvid.org*"} | Remove-DnsServerResourceRecord
Remove-DnsServerResourceRecord : The input object cannot be bound because it did not contain the information required to bind all mandatory parameters: ZoneName
At line:1 char:72
- show-DnsServerCache | where {$_.HostName -like "*update.xvid.org*"} | Remove-Dn ...
+ ~~~~~~~~~
+ CategoryInfo : InvalidArgument: (DnsServerResourceRecord:PSObject) [Remove-DnsServerResourceRecord], ParameterBindingException
+ FullyQualifiedErrorId : InputObjectMissingMandatory,Remove-DnsServerResourceRecord
Thursday, December 27, 2018 10:57 AM
Hello
Try again and again... sometimes need time.. bug/future :D
sorry my english
Monday, December 31, 2018 1:45 AM
Hi,
Just checking in to see if the information provided was helpful.
Please let us know if you would like further assistance.
Best Regards,
Zoe
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Wednesday, January 2, 2019 2:13 AM
Hi,
Was your issue resolved?
If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.
If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.
If no, please reply and tell us the current situation in order to provide further help.
Best Regards,
Zoe
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Monday, January 7, 2019 2:31 AM
Hi,
As this thread has been quiet for a while, we will propose the solution as answer. If you need further help, please feel free to reply this post directly so we will be notified to follow it up. You can also choose to unpropose the answer as you wish.
BTW, we'd love to hear your feedback about it.
Best Regards,
Zoe
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected].