Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Invoke-IcingaCheckScheduledTask works directly but fails via Exit-IcingaExecutePlugin when using -TaskPath array

オープン
#475 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
powershell
領域
cli

調査の方向性

同じ -TaskPath 配列を使用して、直接の Invoke-IcingaCheckScheduledTask コマンドと Exit-IcingaExecutePlugin wrapper コマンドを再現します。まず、Exit-IcingaExecutePlugin が -TaskPath を Invoke-IcingaCheckScheduledTask にどのように渡しているかを比較します。wrapper がフィルタリングされた \Icinga\ タスクを返し、パッケージに checks を追加し、終了コード 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時間
マージ済み PR(30日)
6

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Icinga/icinga-powershell-plugins のほかの issue

Icinga/icinga-powershell-plugins の issue をすべて見る

似ている issue

CLI の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。