how to download a file (report) form local intranet with login credentials

If anybody know how to script this below task

My daily task is to download a excel report form our intranet, the thing is i need to click 2 to 3 links to get the file in seperate window. in that case how can i edit this script…

Do you have a script already which does not work for you?

Hi daniel,

No, i dont create. But when looking for such script. i came across this below one:

#Download SubInACL.msi to Desktop
Get-FileAndExtract ‘’ “$([Environment]::GetFolderPath(“Desktop”))”

#Download and extract the contents of to Desktop\SysInternalSuite (folder SysInternalSuite is created)
Get-FileAndExtract ‘’ “$([Environment]::GetFolderPath(“Desktop”))”

#Download and extract the contents of to Desktop\WorkSmartGuides (no folder is created since .zip already contains folder)
Get-FileAndExtract ‘’ “$([Environment]::GetFolderPath(“Desktop”))”

Ok. Please see if below is something you can work with.

$uri = ''
$outFile = 'C:\TEMP\MyExcel.xlsx'
$creds = Get-Credential

Invoke-WebRequest -UseBasicParsing -Uri $uri -OutFile $outFile -Credential $creds -Verbose

HI daniel, thanks for your response… Pls see my realtime scenario.

step 1: i this is home page in which i will suppy credential (for security pupose i replaced my own site name as

Step 2: After logged in, i will click on “Report” Link which will invoke seperate webpage(

step 3: In that seperate webpage i have to select the Report(this is drop down menu) “Created by me” and i will select appropriate report and download.

thanks in advance

I believe that won’t be something that PowerShell can solve for you because the report you’re accessing through the web UI will be generated dynamically. You would need something like Selenium to drive a browser.

Alternatives are:

  • Work with the team responsible for your BMC Remedy environment they are usually not bad people to export on their end and upload to an FTP/SFTP server of your choice.
  • Create an email subscription and get the report send into a shared mailbox. Assuming you have Exchange as email backend you could now use the Exchange Web Services API with PowerShell to detach the report from an email onto the disk.

I hope that makes sense.

P.S. I don’t have access to an BMC Remedy system to help you further.

Ohhh… i also her about the selinium… ok let me discuss with my team…about this

And thanks for your support… daniel

Shouldn’t there also be a Rest API available for Remedy that would allow you to pull the information required???