How to Install
DNSTools have been published to the Powershell Gallery. You can find the page here. These can be installed by running
Install-Module -Name dnstools
These tools have also been published to Github so please publish any issues you find here.
Introduction
If you’re wondering what DNSTools are… Well what initially started as my first time trying to write a Powershell module turned into what I’m now calling DNSTools.
Put simply, DNSTools is a basic set of PowerShell commandlets for quickly checking SPF, DMARC, MX and other DNS (Domain) records.
For further info on SPF / DMARC / DKIM please see the below article.
What can DNSTools do for me
Once installed DNSTools will add the below commandlets to powershell.
- Get-SPF
- Get-Dmarc
- Get-MX
- Get-AllEmail
- DNSTools
Check the Examples Section at the end to see what you’re missing out on!
Why DNSTools?
Especially since the changes made by Google and Yahoo earlier this year I often find myself querying other company domains to see how far these changes have had an impact and so rather then having to mess around with nslookup and numerous commands, DNSTools completes all these requests in quickform. I’m always looking to improve these tools however and so if you have any suggestions I’ll be happy to consider these. Please either add a comment to this page, Or email them to suggestions@talkingbytes.co.uk
Examples
Get-SPF

Get-Dmarc
By Default, This will just show a summary of the DMARC Status, Dmarc Reject, Dmarc Quarantine, No DMARC for Domain.

Adding -full 1 will also add the full Dmarc Record as below

Get-MX

Get-AllEmail
Again, By default Get-AllEmail will only return the summary of the Dmarc Record, To show the full record use get-dmarc <domainname> -full 1
