Closed ghost closed 4 years ago
Does this fit your use-case https://stackoverflow.com/a/51423412?
Does this fit your use-case https://stackoverflow.com/a/51423412?
Unfortunately not as it only resolves A, AAAA, and PTR records. The Get-Dns
cmdlet has a nice -RecordType parameter and I can pass in the record type from the JSON files.
Does this fit your use-case https://stackoverflow.com/a/51423412?
Unfortunately not as it only resolves A, AAAA, and PTR records. The
Get-Dns
cmdlet has a nice -RecordType parameter and I can pass in the record type from the JSON files.
Have you tested it? I can resolve our own CNAME records with it, if all you're doing is "test whether a DNS record we've marked as inactive still resolves or not." then it should be enough?
Does this fit your use-case https://stackoverflow.com/a/51423412?
Unfortunately not as it only resolves A, AAAA, and PTR records. The
Get-Dns
cmdlet has a nice -RecordType parameter and I can pass in the record type from the JSON files.Have you tested it? I can resolve our own CNAME records with it, if all you're doing it "test whether a DNS record we've marked as inactive still resolves or not." then it should be enough?
Let me try it out 👍
Closing as [System.Net.Dns]::GetHostEntry('')
can be used in replacement, and removes the dependency of an external module as it's built into PowerShell Core.
Indented.Net.Dns
. This is a module that allows DNS resolution on both Windows and Linux using the cmdletGet-Dns
. https://www.powershellgallery.com/packages/Indented.Net.Dns/6.1.1 https://github.com/indented-automation/Indented.Net.DnsResolve-DnsName
does not work on Linux and therefore I needed a cmdlet that was compatible on both Windows and Linux.das-dns-automation-cleanup
solution that uses it to test whether a DNS record we've marked asinactive
still resolves or not.