Resolve-DnsName PowerShell command

Every now and then you find these small little things that turn out to be very useful. The Resolve-DnsName cmdlet in PowerShell is such a brilliant thing, and it is a nice replacement for NSLOOKUP. Since it is a PowerShell cmdlet you can easily use it in scripts. It looks like this command was introduced in Windows Server 2012 R2, but I found out only a couple of days ago.

As an Exchange consultant I can use the Resolve-DnsName for retrieving my MX records, or my DMARC record:

image

Using the Get-Help Resolve-DnsName command you can get more information, if you need some examples on how to use it you can use the -Examples option, or the -Detailed and -Full options.

image

Very useful for an Exchange admin, and it can be used in PowerShell scripts.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s