dmstork / Show-AntiSpoof

Exchange PowerShell based script that checks every accepted domain of Exchange and will show the DNS configuration of SPF and DMARC for each domain using an external DNS server.
https://dirteam.com/dave
MIT License
19 stars 1 forks source link

Timeout at the cmd line #14

Open DonMVB opened 2 years ago

DonMVB commented 2 years ago

Hi - I downloaded the script this AM (by copy and paste from the RAW page). Got an error w/ just the DNS name. Deets below (can I say deets these days, is that what the kewel kidz are doing...?)

This worked - meaning I got results. PS C:\PowerShell> .\getantispoof.ps1 something.com -DNSserver 208.67.222.222

In my case, I have VMware Pro installed, and 3 NIC's, so maybe this is a matter of how the code pulls the DNS servers for the "Ethernet" adapter... These lines work to get me my "default DNS servers".

$dneservers = Get-DnsClientServerAddress -InterfaceAlias "Ethernet" -AddressFamily IPv4

$dneservers | ForEach-Object {$_.ServerAddresses } 208.67.222.222 208.67.220.220

When I try " PS C:\PowerShell> .\getantispoof.ps1 something.com " This did not - meaning I got the errors below - I used a real domain like ibm.com.

Error with DNS server, using default. internet.nl : This operation returned because the timeout period expired Get-AcceptedDomain : The term 'Get-AcceptedDomain' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\PowerShell\getantispoof.ps1:131 char:24

dmstork commented 2 years ago

Yeah, this is related to #3 . I'll probably will use your suggestion, thanks!