This document explains the correct configuration required for running GraphAutomation.ps1 reliably.
- Run whether user is logged on or not ✅
- Run with highest privileges ✅
- Do NOT check "Do not store password" ❌
Why? Windows runs tasks without stored passwords using a restricted token, which breaks:
- PowerShell execution
- Network access
- API calls
-
On windows search bar, type "Task Scheduler".
-
To create basic task, right click on the Task Scheduler Library and click Create Basic Task....
- Name the task and type a description and click next.
- Set the Trigger to Daily in this case and click next.
- Set the start time to tell the scheduler when to start this task. Check the box for Synchronize across time zones. Click next.
- Set Start a program on Action tab. Click next.
- On Start a Program tab, fill below and click next.
Program/script:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exeAdd arguments:
-ExecutionPolicy Bypass -NonInteractive -File "C:\Program Files (x86)\PRTG Network Monitor\notifications\exe\GraphAutomation.ps1"Start in:
C:\Program Files (x86)\PRTG Network Monitor\notifications\exe- Review the settings and click Finish.
- Then select the create task, right click and select Properties.
- On General tab, make sure to:
- Check box for Run whether user is logged on or not
- Check box for Run with highest privileges
- Uncheck box for Do not store password. The task will only have access to local computer resources.
- On Triggers tab, make sure the Status is Enabled.
- On Settings tab and click ok.
- Check box for Allow task to be run on demand
- Check box for Stop the task if it runs longer than: select 1 hour
- Check box for If the running task does not end when requested, force it to stop
- Select Stop the existing instance under If the task is not scheduled to run again, delete it after
- To run the task manually, select the create task and click Run on the right side of the tab
Expected results:
- Exit code: 0x0
- Telegram message received











