Commands / Network

Resolve-DnsName

Look up a DNS name

beginner Network

Resolve-DnsName
 Resolve-DnsName -Name example.com
Works on
Windows
PowerShell
5.1 and later
Reference
Microsoft Learn: Resolve-DnsName

Windows-only. -Type A or -Type MX when you care about a record type. On PowerShell 7 on Linux/macOS, use Resolve-DnsName only if the module exists, or call nslookup.

Try this

Resolve-DnsName -Name example.com -Type A

Coming from another shell

ShellWhat you might type
bash / zshdig example.com
cmd.exenslookup example.com

More in From bash and From cmd.

Related commands