Invoke Item and Task Scheduler

Hello,

I would like to ask you about running invoke-item command as a registered scheduled job. I want to restart one program automatically if specific conditions are met, using task scheduler. Just starting the script works fine, but If I try to run it using task scheduler, then the Invoke-item command doesnt run.

Script(the path is just different in reality):

Stop-Process -processname Program
Invoke-Item -path 'Path\Program.exe'

Is there something specific to include to Scheduled job setting to make it run all?

Thank you very much for your help, Martin.

February 2nd, 2015 5:30am

Hi Mufmatzner,

try not to start applications with Invoke-Item - use Start-Process instead.

That would work flawlessly (assuming the application can run unattended, of course).

Cheers,
Fred

Free Windows Admin Tool Kit Click here and download it now
February 2nd, 2015 7:02am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics