View SPF Details from DNS Using PowerShell

less than 1 minute read

SPF records are something I am working with this week and needed to look at some so I figured PowerShell would be a fun way to do it. Here’s the short snippet:

Resolve-DnsName -Name -Type TXT | 
Where-Object Strings -like v=* | 
Select-Object -ExpandProperty Strings

v=spf1 ?all