Microsoft DnsClient reference: Performs a DNS name query resolution for the specified name. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for Resolve-DnsName. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / DnsClient · Windows Server 2025 documentation; feature/module prerequisites apply
Parameters
-CacheOnly
Resolves this query using only the local cache.
-DnsOnly
Resolves this query using only the DNS protocol.
-DnssecCd
Sets the DNSSEC checking-disabled bit for this query.
-DnssecOk
Sets the DNSSEC OK bit for this query.
-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.
-Name (required)
Specifies the name to be resolved.
-NetbiosFallback
Allows fallback to the NetBIOS protocol when resolving this query with DNS fails.
-NoHostsFile
Skips the hosts file when resolving this query.
-NoIdn
Specifies not to use IDN encoding logic for the query.
-NoRecursion
Instructs the server not to use recursion when resolving this query.
-QuickTimeout
Uses shorter timeouts for this query.
-Server
Specifies the IP addresses or host names of the DNS servers to be queried. By default the interface DNS servers are queried if this parameter is not supplied.
-TcpOnly
Uses only TCP for this query.
-Type
Specifies the DNS query type that is to be issued. By default the type is A_AAAA, the A and AAAA types will both be queried. The acceptable values for this parameter are: -- UNKNOWN = 0, -- A_AAAA = 0, the DNS query type is A_AAAA. -- A = 1, the DNS query type is IPv4 server Address. -- AAAA = 28, the DNS query type is IPv6 server address. -- NS = 2, the DNS query type is name server. -- MX = 15, the DNS query type is mail routing information. -- MD = 3, the DNS query type is mail destination. -- MF = 4, the DNS query type is mail forwarder. -- CNAME = 5, the DNS query type is canonical name. -- SOA = 6, the DNS query type is start of authority zone. -- MB = 7, the DNS query type is mailbox domain name. -- MG = 8, the DNS query type is mail group member. -- MR = 9, the DNS query type is mail rename name. -- NULL = 10, the DNS query type is null resource record. -- WKS = 11, the DNS query type is well known service. -- PTR = 12, the DNS query type is domain name pointer. -- HINFO = 13, the DNS query type is host information. -- MINFO = 14, the DNS query type is mailbox information. -- TXT = 16, the DNS query type is text strings. -- RP = 17, the DNS query type is responsible person. -- AFSDB = 18, the DNS query type is AFS database servers. -- X25 = 19, the DNS query type is packet switched wide area network. -- ISDN = 20, the DNS query type is Integrated Services Digital Network. -- RT = 21, the DNS query type is DNS route through. -- SRV = 33, the DNS query type is server selection. -- DNAME = 39, the DNS query type is domain aliases. -- OPT = 41, the DNS query type is DNS option. -- DS = 43, the DNS query type is delegation signer. -- RRSIG = 46, the DNS query type is DNSSEC signature. -- NSEC = 47, the DNS query type is next-secure record. -- DNSKEY = 48, the DNS query type is DNS key record. -- DHCID = 49, the DNS query type is Dynamic Host Configuration Protocol
Prerequisites
Windows with the DnsClient module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
Security considerations
This is a read-oriented cmdlet; protect any sensitive results and check the documented effects of your selected parameters.
Examples
EXAMPLE 1
Resolve-DnsName -Name www.bing.com
This example resolves a name using the default options. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.