Fixes IfW service installation on certain Windows environment

This commit is contained in:
Lord Hepipud 2025-02-03 12:37:37 +01:00
parent 517c19e012
commit 8ed2c48d45
2 changed files with 11 additions and 1 deletions

View file

@ -7,6 +7,16 @@ documentation before upgrading to a new release.
Released closed milestones can be found on [GitHub](https://github.com/Icinga/icinga-powershell-framework/milestones?state=closed).
## 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)

View file

@ -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;