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? -

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

ajax - PHP/JSON Login script (Twitter style) not setting sessions -