From 2263c817dd7052df94377451645bb66fef7e74c8 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Mon, 3 Feb 2025 12:37:37 +0100 Subject: [PATCH] Fixes IfW service installation on certain Windows environment --- doc/100-General/10-Changelog.md | 10 ++++++++++ jobs/GetWindowsService.ps1 | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/100-General/10-Changelog.md b/doc/100-General/10-Changelog.md index 5b84ce1..a112b50 100644 --- a/doc/100-General/10-Changelog.md +++ b/doc/100-General/10-Changelog.md @@ -11,6 +11,16 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic [Issues and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/38) +## 1.13.2 (2025-02-03) + +[Issues and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/40) + +* [#780](https://github.com/Icinga/icinga-powershell-framework/issues/780) Fixes Icinga for Windows service installation not working properly on certain Windows environments + +### Bugfixes + +* [#778](https://github.com/Icinga/icinga-powershell-framework/issues/778) Fixes test commands like `Test-IcingaForWindows` failing because of wrong assigned ServiceData information. + ## 1.13.1 (2025-01-31) [Issues and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/39) diff --git a/jobs/GetWindowsService.ps1 b/jobs/GetWindowsService.ps1 index 4778d58..6acf6e4 100644 --- a/jobs/GetWindowsService.ps1 +++ b/jobs/GetWindowsService.ps1 @@ -18,7 +18,7 @@ Use-Icinga -Minimal; try { $SvcData = Get-IcingaServices "$ServiceName" -ErrorAction Stop; - if ($null -ne $SvcData) { + if ($null -ne $SvcData -And $SvcData.Count -ne 0) { $ServiceConfig = $SvcData."$ServiceName".configuration; $ServiceMeta = $SvcData."$ServiceName".metadata; $ServiceData.Status = [string]$ServiceConfig.Status.value;