Closed
Description
I've created a service/monitor with the Invoke-IcingaCheckUpdates command, version 1.7.0 (same issue with 1.6.0).
"Inspect" shows the following call:
'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' '-NoProfile' '-NoLogo' '-ExecutionPolicy' 'ByPass' '-C' 'try { Use-Icinga -Minimal; } catch { Write-Output '\''The Icinga PowerShell Framework is either not installed on the system or not configured properly. Please check https://icinga.com/docs/windows for further details'\''; exit 3; }; Exit-IcingaExecutePlugin -Command '\''Invoke-IcingaCheckUpdates'\'' ' '-UpdateFilter' '@()' '-Warning' '0' '-Critical' '5' '-Verbosity' '1' '-NoPerfData'
There is currently one update waiting on the system, so the monitor should create a WARNING-state.
Opening a PS locally (no difference between an admin-PS and a non-privileged PS) and call this command
Invoke-IcingaCheckUpdates -UpdateFilter @() -Warning 0 -Critical 5 -Verbosity 1 -NoPerfData
[WARNING] Windows Updates [WARNING] Pending Update Count
\_ [WARNING] Pending Update Count
\_ [WARNING] Pending Update Count: 1 is greater than threshold 0
1
The Icinga2-service is running in the context of "NT AUTHORITY\NetworkService".