SkillsFundingAgency / das-azure-pipelines-agents

MIT License
0 stars 2 forks source link

Adding PowerShell Module Indented.Net.Dns #2

Closed ghost closed 4 years ago

ghost commented 4 years ago
EwanNoble commented 4 years ago

Does this fit your use-case https://stackoverflow.com/a/51423412?

ghost commented 4 years ago

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.

EwanNoble commented 4 years ago

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?

ghost commented 4 years ago

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 👍

ghost commented 4 years ago

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.