0

I am looking to run an Alteryx file with powershell through task scheduler in Windows 10. I have everything working, when the computer is unlocked, since I can send keys, however when the computer locks, sendkeys does not work and my script fails.

Since I want to run the file early in the morning, I need this to work when computer is locked. Any help would be appreciated.

start-Process -Filepath "filepath.yxmd"
sleep - s 60
$obj = New-Object -com Wscript.Shell
sleep - s 3
$obj.sendkeys("^{r}")

It is a bummer cause Alteryx want users to pay more money to schedule files...

Lowpar
  • 897
  • 10
  • 31
  • Nothing simple, but I think Powershell has access to DotNet, so I would start here: https://stackoverflow.com/questions/5764174/unlock-local-computer-using-net – johnjps111 Oct 19 '22 at 10:39

0 Answers0