Nslookup

Details

In a Windows environment, you can troubleshoot DNS with the nslookup command, either interactively or from the command prompt.

nslookup -Option Host Server

Usage

nslookup -type=mx widget.com 8.8.8.8

Powershell DNS resolution

Resolve Host

Resolve-DnsName host

Resolve host using the same method as the Windows client

Resolve-DnsName host -NoHostsFile

Resolve host but without using any entries from the HOSTS file in the local cache

Resolve-DnsName host -DnsOnly

Resolve host using only the DNS server

-Server IPofDNSserver

Additional

It is also possible to search DNS for records other than A or Aaaa records. For example, to show only Mail Exchange records in a specific domain, use the cmdlet:

Resolve-DnsName domain-Type MX