Extraneous results returned with Resolve-DnsName (dnsclient)
Quoted feedback from documentation feedback provided by MSFT team below. (via @jordanmills)
> When resolving SRV records (example: Resolve-DnsName -Name "kerberos.tcp.dc._msdcs.$env:userdnsdomain" -Type SRV), the cmdlets also attempts to resolve any returned A or AAAA records and sends them to the pipeline as a separate object collection. This breaks pretty much any attempt to sort, group, filter, or otherwise process the data. How can we make it not return A and AAAA records for SRV queries?
https://github.com/MicrosoftDocs/windows-powershell-docs/issues/302

2 comments
-
Nicholas Getchell commented
This cmdlet pollutes the pipeline with extraneous results. Filtering doesn't work and member properties of the returned object are not named the same "QueryType and Type" so it makes it very hard to work with the results of this cmdlet.
-
Jason commented
This also happens with "Resolve-DnsName -Name <FQDN> -Type A". It returns A and CNAME records. The Type parameter needs to only return what is specified and not include extra random stuff.