Link to home
Start Free TrialLog in
Avatar of NVIT
NVITFlag for United States of America

asked on

How to download file from website

Can this be done in PowerShell? If so, how much work is it? I'm getting tired of the routine of downloading a file manually several times weekly.

Basically...
1. Logon the site.
2. Pick More to show all records
3a. Pick down arrow at upper right
3b. Pick Export Excel menu option. NOTE: When I hover my mouse over this option, it doesn't show a download link as I'd expect
3c. Pick Save file option and OK.
4. Pick Logout icon
User generated imageUser generated imageUser generated imageUser generated image
Avatar of Sam Jacobs
Sam Jacobs
Flag of United States of America image

Yes, it can, but you would need to be (or get) familiar with COM object manipulation, e.g.
[System.__ComObject]$ie = New-Object -ComObject "InternetExplorer.Application"
[System.__ComObject].InvokeMember(“getElementsByClassName”,[System.Reflection.BindingFlags]::InvokeMethod, $null, $document, $className)
[System.__ComObject].InvokeMember(“getElementById”,[System.Reflection.BindingFlags]::InvokeMethod, $null, $document, $fieldID)

You might find a scripting language like AutoHotKey easier.
Avatar of Bill Prew
Bill Prew

You could also look at iMacros.  There is a free browser extension version of the tool which has less features than the paid versions, but still can be quite useful.  You might want to take a look and see if it might meet your need.  It has a "macro recorder" that can help you get a good starting point to a "script" that you can then tweak.  I've used it in the past for some light browser automation and was able to make it work.  But your mileage may vary...

iMacros for Chrome - Chrome Web Store


»bp
@NVIT,

Are you all set with this now, or do you need more help?  If all set, could you please close it out now.  If you need help with the question close process take a look at:



»bp
ASKER CERTIFIED SOLUTION
Avatar of NVIT
NVIT
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial