Resolve-DnsName
Look up a DNS name
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
| Shell | What you might type |
|---|---|
| bash / zsh | dig example.com |
| cmd.exe | nslookup example.com |
More in From bash and From cmd.