windows - Command runs fine on command line but not from Task Scheduler -


powershell 2.0 on windows 7 64-bit

when tested out in shell, following works fine:

powershell -command { sleep 5 }      

but when have in scheduled task, powershell in program box , -command { sleep 5 } in argument box, task scheduler reports "the operation completed successfully. (0x0)" nothing run.

i had record screen video camera , played in slow motion find out going on. after powershell profile script runs, sleep 5 shows on screen no error , powershell closes immediately.

(both x86 , x64 versions have executionpolicy set remotesigned.)

what have make -command work in task scheduler? .

try powershell -command "sleep 5" instead.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -