I'm trying to run a PowerShell script that runs hourly. When I run the script outside Task Scheduller it goes right, but when I try to run using task scheduller, it shows me an (0x1) error.
Here is how my task is configured:
- Action: Start a Program
- Program/Script:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
- Add Argument (Optional):
powershell.exe -NoProfile -NoLogo -NonInteractive -ExecutionPolicy Bypass -File \\C:\xampp\java_monitor.ps1
- Start in (Optional): Empty
Does anyone knows what should I change or add to fix execution?