Automate website search using powershell and output results to text file -


i'm trying automate task of checking sites spf records , wondering if have got around this. need able go site , type in domain name eg. stuff.co.nz , click on get spf record , output result text file.

below i've attempted do. appreciated.

$ie = new-object -com internetexplorer.application  $ie.visible=$true  $ie.navigate("http://www.kitterman.com/spf/validate.html")  $ie.document.getelementsbyname("domain").value="stuff.co.nz"  $ie.document.getelementsbyvalue("get spf record (if any)").click() 

i think it's not necessary launch ie accomplish this.

the below script should make http post request spf records , saves output text file.

$postparams = @{domain='stuff.co.nz';serial='fred12'} invoke-webrequest -uri http://www.kitterman.com/getspf2.py -method post -body $postparams -outfile output.txt 

if still use ie, need save whole page. refer this post.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -