Using Task Scheduler

Feb 17, 2015 at 10:32 PM
I am trying to use the Task Scheduler, Powershell and WASP to automate the downloading of a file from IE9. The file is generated using javascript on the client browser. The script I have works fine is the task is run as logged on user, however when I change the task to 'Run whether user is logged on or not' it fails.

When I make a call to 'Select-Window' nothing is returned. Is this expected behaviour?
How can I find the dialog pop-up and click the Save button - it has the same MainWindowTitle as its parent.
Feb 17, 2015 at 11:19 PM
Scheduled tasks that don't run "interactive" when the user is logged on can't spawn UI, so opening IE isn't going to work.

You might be able to use Microsoft's Invoke-WebRequest (because it uses IE headless but still seems to run javascript), but I wouldn't even be sure about that. You could possibly use selenium with their phoenixjs(?) headless browser ... but again, I am not sure.