Powershell - Testing name resolution (equivalent to nslookup)
To support me, you can subscribe to the channel, share and like the videos, disable your ad blocker or make a donation. Thank you!
Hello,
After the commands for displaying and modifying the DNS configuration of network interfaces, here is a set of Powershell commands for performing name resolution tests
# Test name resolution (equivalent to nslookup)Resolve-Dnsname -Name google.com
# Display resource records (in the example, NS: name server)Resolve-Dnsname -Name google.com -Type NS
# Get the result for several names"google.com", "google.fr" | Resolve-DnsName -Type A
# Perform a reverse DNS queryResolve-Dnsname -Name 172.217.20.195
# Obtain the result from a specific DNS serverResolve-Dnsname -Name google.com -Type A -Server 1.1.1.1
# Obtain the result from a DNS server onlyResolve-DnsName -Name www.google.com -DnsOnly
# Get the result from the cache onlyResolve-DnsName -Name www.google.com -CacheOnly
# Get the result using DNSSecResolve-DnsName -Name www.google.com -DnssecOk
# Get the result without using DNSSecResolve-DnsName -Name www.google.com -DnssecCd
# Obtain the result without using the hosts fileResolve-DnsName -Name www.google.com -NoHostsFile
# If DNS fails, try using NetbiosResolve-DnsName -Name srv-1 -NetbiosFallback
# If DNS fails, try using LLMNRResolve-DnsName -Name srv-1 -LlmnrFallback
# Obtain the result with LLMNR and NetbiosResolve-DnsName -Name srv-1 -LlmnrNetbiosOnly
# Obtain the result with LLMNR onlyResolve-DnsName -Name srv-1 -LlmnrOnly
# Ask the DNS server not to use recursive queriesResolve-DnsName -Name www.google.com -NoRecursion
# Reduce the timeout durationResolve-DnsName -Name google.com -QuickTimeout
# Obtain the result using TCP onlyResolve-DnsName -Name www.google.com -TcpOnly
# There are 3 parameters not documented in the help on my Windows 11 24h2 but I haven't found any information about them# -CheckCache# -DohServer# -DotServer
Related links
Powershell - Testing network connectivity and port accessibility
Testing network connectivity and port accessibility with PowershellPowershell - Display network connections (equivalent to netstat)
Display network connections (listening ports, active connections...)Powershell - Testing name resolution (equivalent to nslookup)
Powershell commands to test name resolution (equivalent to nslookup)Powershell - View and manage DNS configuration of network interfaces
Powershell commands to display and manage DNS configuration of network interfacesPowershell - Managing IP configuration of network interfaces
Powershell commands to view and modify the IP configuration of network interfacesPowershell - Managing the status and configuration of network interfaces
Powershell commands to view and modify the status and configuration of network interfaces (disable IPv6, enable/disable an interface)
Follow me on
Support me
Last content
Powershell - Testing network connectivity and port accessibility
Powershell - Display network connections (equivalent to netstat)
Powershell - Testing name resolution (equivalent to nslookup)
Powershell - View and manage DNS configuration of network interfaces
Powershell - Managing IP configuration of network interfaces
Powershell - Managing the status and configuration of network interfaces
Powershell and the Left Hand Side
Powershell - Managing disks, partitions and volumes