diff --git a/doc/100-General/10-Changelog.md b/doc/100-General/10-Changelog.md index 54bfe5a..21141de 100644 --- a/doc/100-General/10-Changelog.md +++ b/doc/100-General/10-Changelog.md @@ -30,6 +30,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic * [#436](https://github.com/Icinga/icinga-powershell-framework/pull/436) Fixes a lookup error for existing plugin documentation files, which caused files not being generated properly in case a similar name was already present on the system * [#439](https://github.com/Icinga/icinga-powershell-framework/pull/439) Moves PerformanceCounter to private space from previous public, which caused some problems * [#441](https://github.com/Icinga/icinga-powershell-framework/pull/441) Fixes an exception while loading the Framework, caused by a race condition for missing environment variables which are accessed by some plugins before the Framework is loaded properly +* [#443](https://github.com/Icinga/icinga-powershell-framework/issues/443) Fixes `Get-IcingaServices` which returned `Unknown` for service `StartType`, in case the `-Service` argument contained values with wildcard `*` * [#446](https://github.com/Icinga/icinga-powershell-framework/pull/446) Fixes Icinga for Windows progress preference, which sometimes caused UI glitches * [#449](https://github.com/Icinga/icinga-powershell-framework/pull/449) Fixes unhandled exception while importing modules during `Install-IcingaComponent` process, because of possible missing dependencies * [#451](https://github.com/Icinga/icinga-powershell-framework/pull/451) Fixes PowerShell being unable to enter JEA context if only the Framework is installed and removes the `|` from plugin output, in case a JEA error is thrown that check commands are not present diff --git a/lib/core/tools/Get-IcingaServices.psm1 b/lib/core/tools/Get-IcingaServices.psm1 index ab6b739..70d3ede 100644 --- a/lib/core/tools/Get-IcingaServices.psm1 +++ b/lib/core/tools/Get-IcingaServices.psm1 @@ -11,7 +11,14 @@ function Get-IcingaServices() if ($Service.Count -eq 0) { $ServiceWmiInfo = Get-IcingaWindowsInformation Win32_Service; } else { - $ServiceWmiInfo = Get-IcingaWindowsInformation Win32_Service | Where-Object { $Service -Contains $_.Name } | Select-Object StartName, Name, ExitCode, StartMode, PathName; + $ServiceWmiInfo = Get-IcingaWindowsInformation Win32_Service | + ForEach-Object { + foreach ($svc in $Service) { + if ($_.Name -Like $svc) { + return $_; + } + } + } | Select-Object StartName, Name, ExitCode, StartMode, PathName; } if ($null -eq $ServiceInformation) {