Is it possible to launch a browser with task scheduler as system account?

Copper Contributor

Hi everyone, I hope you can help:

Is it possible to launch a browser,
to open a web page that works in get mode
using powershell on task scheduler,
running as system account to avoid screen updating,
every time any user is logging in,
and then, after the url responds,
close the browser gracefully (other than killing it)?


5 Replies
"that works in get mode using powershell on task scheduler" You have to give some more detail, do you wnat to download/invoke something when a user logs in? You can start things at user login, but not as system login...
ok, I know what do I need, but how to do it... I'll try to clarify the scenario:
1) use task scheduler whenever a user logs in, to run powershell minimized or hidden
2) powershell must get some data
3) powershell must launch a browser minimized or hidden
4) browser must point to an url that runs in get mode (https://...?data1&data2...)
5) browser must be terminated gracefully (not being killed or abandoned)
6) use system account to avoid password change issues if possible

Actually, this is what I got:
1) done, except by running minimized or hidden
2) done
3) browser launch done, but not minimized or hidden
4) done
5) I need help to:
a) get hwnd in start-process
b) set its window size to a minimum or better yet, hidden
c) send keys (%{F4}) or better yet, a message to close browser
6) don´t know if it works

if something needs clarification, please let me know.
best response confirmed by oldyguy (Copper Contributor)
Does it really need to open the browser?
Can you use Invoke-WebRequest directly from PowerShell?
hi @Newbie_Jones it looks promising... I'm starting to think I'm reinventing the wheel because I'm a rookie on all this web mumbo-jumbo
I'll post my results asap, thx a lot.
hi @Newbie_Jones & @Harm_Veenstra, I'm glad to report that Invoke-WebRequest did the job as a charm and I'm about to finish my project, thank you for your help!
1 best response

Accepted Solutions
best response confirmed by oldyguy (Copper Contributor)