[dns-operations] Single label queries on Windows (11)
Robert Edmonds
edmonds at mycre.ws
Mon Jul 10 18:31:20 UTC 2023
Petr Menšík wrote:
> Even on *x nslookup and dig tools use own resolution code. That is because
> they are DNS specific utilities. Not something using getaddrinfo() calls,
> which common applications use.
>
> Is there alternative to "getent ahosts <hostname>" on Microsoft systems?
> Using ping for that helps in a limited way, but is not perfect.
Hmm:
https://learn.microsoft.com/en-us/powershell/module/dnsclient/resolve-dnsname
It's called "Resolve-DnsName" but the name is highly misleading since
it supports a bunch of other resolution methods:
-LlmnrFallback
Allows falling back to the LLMNR protocol when resolving this query with DNS fails.
-LlmnrNetbiosOnly
Resolves this query using only the LLMNR or NetBIOS protocols.
-LlmnrOnly
Resolves this query using only the LLMNR protocol.
-NetbiosFallback
Allows fallback to the NetBIOS protocol when resolving this query with DNS fails.
-NoHostsFile
Skips the hosts file when resolving this query.
--
Robert Edmonds
More information about the dns-operations
mailing list