We have a portal which has link to download excel report, I need a way to download this server report using powershell. I did invoke-webrequest and parsed through the output to the form which contains the information I need as below;
<p lang=“en-US” style=“margin: 0in; font-family: Calibri; font-size: 11.0pt;”>PS C:> $portal= Invoke-WebRequest -Uri “http://xxxx.srv.xxxx.com/xxdb/server_results.asp?devicename=server148”</p>
<p lang=“en-US” style=“margin: 0in; font-family: Calibri; font-size: 11.0pt;”>PS C:> $portal.Forms[1]</p>
<p lang=“en-US” style=“margin: 0in; font-family: Calibri; font-size: 11.0pt;”>Method - Get</p>
<p lang=“en-US”>Action - server_results_excelexport.asp</p>
<p lang=“en-US”>Fields - {[devicename, server148]}</p>
I found the Action ‘server_results_excelexport.asp’ generates the excel report. Is there a way to run that asp from my powershell session so that I can then get that excel report?