I have four PS scripts executed daily by windows scheduler and suddenly two weeks ago all stopped working. I checked also if windows (7 home premium) installed new updates, but there was only windows essential updates. All the scripts work if executed manually, but now any PS script executed through windows scheduler fails always, I can't find any error anywhere, just the result of the task is 0x1 without a message.
I have created also a test script:
write-host (get-date) "This is a test"
and the "action" of the task is:
Program/script: powershell.exe
Add arguments: -c .\test.ps1
And it fails too, but two weeks ago they were all working. I'm quite sure about the day that they stopped working because I save the script output in a log file with the following technique:
Program/script: powershell.exe
Add arguments: -c "powershell -c .\test.ps1 2>&1 >> .\test.log"
And the last entry in the log files is dated 05/17/2016, so since then all the scripts fail and I can't find the reason, I looked also in the event viewer and activated the task history, but nothing, no errors. I can't find anywhere an error, a clue that
can point me in the right direction. At this point I would appreciate some help because I am out of ideas.
Thanks in advance.