mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes Get-IcingaService StartType with wildcards
This commit is contained in:
parent
c8e8683390
commit
c96d49551e
2 changed files with 9 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue