I want to inspect TXT records for my domain, such as SPF records. I tried the following command with nslookup but it didn't list the TXT records:
nslookup -type=TXT example.com
What is the correct command, or is there a better tool use on Windows 7?
First start
nslookup
without parameters, then typeset type=txt
, then type the domain name.Example
I have no ideea why but if you add an IP of a nameser at the end it will work.
I have added google's dns name in this case:
nslookup -type=TXT villagevines.com 8.8.8.8
It can be your local DNS service.
HTH next time when you need to query your TXT records.
The link for Get-Dns does not work, the standard Powershell cmdlet to do this is
PS> Resolve-DnsName villagevines.com -Type TXT
See more on Resolve-DnsName
In Windows 10, this work:
Update: At this moment 2021-03-29, in Windows 10, you can use old nslookup syntax
Download BIND for Windows, there is a Windows port of
dig
in that. You should use dig instead of nslookup.If you're a Powershell fan (like me) you can also download the Powershell Dig Cmdlet which should get TXT records for you directly within powershell. Good stuff.