Skip to content

Instantly share code, notes, and snippets.

@TomOnTime
Created December 31, 2020 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TomOnTime/2d19f9daab4be68b25eae7d47045e0f7 to your computer and use it in GitHub Desktop.
Save TomOnTime/2d19f9daab4be68b25eae7d47045e0f7 to your computer and use it in GitHub Desktop.
# This works if I include "-ZoneName" and "-Name" on both the Get- and Remove-
Get-DnsServerResourceRecord -ZoneName "example.com" -Name "foo" -RRType "NAPTR" | Where-Object {$_.HostName -eq "foo" -and $_.RecordData.Data -eq "010002000155056C6A736466066C6B6A73666400"} | Remove-DnsServerResourceRecord -Confirm:$false -Force -ZoneName "example.com" -Name "foo"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment