Add host level macro {$TASKPATHS} (open host properties and look for the "Macros" tab) and specify your tasks location(s) in Task Scheduler Library, root is "/", custom folder may be "/CustomFolder/", several locations will be comma-separated: "/,/CustomFolder/"
`Timeout=30`
for Powershell < 7.x
`UserParameter=TaskSchedulerMonitoring[*],powershell -NoProfile -ExecutionPolicy Bypass -File "C:\Zabbix\DiscoverScheduledTasks.ps1" "$1" "$2" "$3"`
for Powershell > 7.x
`UserParameter=TaskSchedulerMonitoring[*],"C:\Program Files\PowerShell\7\pwsh.exe" -NoProfile -ExecutionPolicy Bypass -File "c:\Services\Zabbix\scripts\DiscoverScheduledTasks.ps1" "$1" "$2" "$3"`
Set-ExecutionPolicy RemoteSigned