Invoke-IcingaCheckScheduledTask works directly but fails via Exit-IcingaExecutePlugin when using -TaskPath array
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- powershell
- 领域
- cli
调研方向
使用相同的 -TaskPath 数组重现直接的 Invoke-IcingaCheckScheduledTask 命令和 Exit-IcingaExecutePlugin wrapper 命令。首先比较 Exit-IcingaExecutePlugin 如何将 -TaskPath 传递给 Invoke-IcingaCheckScheduledTask。完成的标准是 wrapper 返回经过筛选的 \Icinga\ 任务,将 checks 添加到 package 中,并以代码 0 退出。
由索引模型根据 Issue 内容生成。
描述
Hi team,
I found a reproducible issue with Invoke-IcingaCheckScheduledTask when called through Exit-IcingaExecutePlugin.
Environment
icinga-powershell-framework: 1.14.2
icinga-powershell-plugins: 1.14.1
Windows Server (PowerShell 5.1)
Icinga 2 command path uses the standard wrapper (PowerShell Base + Exit-IcingaExecutePlugin)
What works (direct invocation)
PS C:\Windows\system32> & 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "Invoke-IcingaCheckScheduledTask -TaskPath @('\Icinga*') -Verbosity 3"
[INFO] Scheduled Tasks (All must be [OK])
_ [INFO] \Icinga\Icinga for Windows\ (All must be [OK])
_ [INFO] Renew Certificate (All must be [OK])
_ [INFO] Last Run Time [2026/04/23 10:26:26]: 1.82h
_ [INFO] Last Task Result: 0
_ [INFO] Missed Runs: 0
_ [INFO] Next Run Time [2026/04/24 01:00:00]: -12.74h
_ [INFO] State: Ready
_ [INFO] Set Process Priority (All must be [OK])
_ [INFO] Last Run Time [2026/04/23 10:27:27]: 1.81h
_ [INFO] Last Task Result: 0
_ [INFO] Missed Runs: 0
_ [INFO] Next Run Time [Never]: Never
_ [INFO] State: Ready
| icinga_icingaforwindows_renewcertificate::ifw_scheduledtask::lastruntime=6565s;;;; icinga_icingaforwindows_renewcertificate::ifw_scheduledtask::lasttaskresult=0;;;; icinga_icingaforwindows_renewcertificate::ifw_scheduledtask::missedruns=0;;;; icinga_icingaforwindows_renewcertificate::ifw_scheduledtask::nextruntime=-45849s;;;; icinga_icingaforwindows_renewcertificate::ifw_scheduledtask::state=3;;;; icinga_icingaforwindows_setprocesspriority::ifw_scheduledtask::lastruntime=6505s;;;; icinga_icingaforwindows_setprocesspriority::ifw_scheduledtask::lasttaskresult=0;;;; icinga_icingaforwindows_setprocesspriority::ifw_scheduledtask::missedruns=0;;;; icinga_icingaforwindows_setprocesspriority::ifw_scheduledtask::nextruntime=0s;;;; icinga_icingaforwindows_setprocesspriority::ifw_scheduledtask::state=3;;;;
0
Expected tasks are returned (e.g. \Icinga\Icinga for Windows...)
Exit code: 0
What fails (wrapper invocation)
PS C:\Windows\system32> & 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "try { Use-Icinga -Minimal } catch { Write-Output 'Framework not loaded'; Write-Output $($_.Exception.Message); exit 3 }; Exit-IcingaExecutePlugin -Command 'invoke-icingacheckscheduledtask' -TaskPath @('\Icinga*') -Verbosity 3"
[INFO] Scheduled Tasks: No checks added to this package (All must be [OK])
|
Exit code: 3
Expected behavior
Wrapper invocation via Exit-IcingaExecutePlugin should behave identically to direct invocation and return the same filtered scheduled tasks for -TaskPath @('\Icinga*').
Actual behavior
Only the wrapper path fails (empty package / no checks added), while direct invocation works with the same arguments.
Notes
This is reproducible consistently on the same host/session.
The issue appears specific to the wrapper argument handling path, not the plugin function itself.
Thanks for taking a look.
- 主要语言
- PowerShell
- 星标
- 55
- 派生
- 31
- 平均合并
- 4 天 5 小时
- 30 天内合并 PR
- 6
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Icinga/icinga-powershell-plugins 的其他 Issue
-
Invoke-IcingaCheckFirewall reports NotConfigured on Windows Server 2025 with GPO-managed firewall未关闭
难度 2/5 1-3 小时 新手友好度 76/100
-
[Feature request] Invoke-IcingaCheckUpdates: Add "Exclude" option(s) to ignore specific updates可能已有人在做 @fthomys 于 29 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
-
难度 4/5 3-5 天 新手友好度 35/100
Icinga/icinga-powershell-plugins#489 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 65/100
-
难度 4/5 3-5 天 新手友好度 35/100
Icinga/icinga-powershell-plugins#478 · 2 条评论 ·
查看 Icinga/icinga-powershell-plugins 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
`soup plan` and `soup apply` refuse a distill config that `soup train --minillm-on-policy` accepts未关闭area:cli difficulty:3 enhancement
难度 2/5 1-3 小时 新手友好度 70/100
MakazhanAlpamys/Soup#2303 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
ranxianglei/billion-context#5036 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
openzim/mwoffliner#2977 ·
维护者通常 1 天内回复
-
bug(tool/cmd): otelc --help lists every command with no description可能已有人在做 @krsatyamthakur-droid 今天认领。 未关闭
难度 1/5 1-3 小时 新手友好度 88/100
open-telemetry/opentelemetry-go-compile-instrumentation#1594 · 1 条评论 ·
维护者通常 2 天内回复