mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes missing attributes for services
This commit is contained in:
parent
15fae3d60b
commit
7bd8dccff8
2 changed files with 4 additions and 2 deletions
|
|
@ -19,6 +19,8 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
||||||
|
* [#240](https://github.com/Icinga/icinga-powershell-framework/pull/240) While filtering for certain services with `Get-IcingaServices`, there were some attributes missing from the collection. These are now added resulting in always correct output data.
|
||||||
|
|
||||||
## 1.4.1 (2021-03-10)
|
## 1.4.1 (2021-03-10)
|
||||||
|
|
||||||
[Issue and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/14?closed=1)
|
[Issue and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/14?closed=1)
|
||||||
|
|
|
||||||
|
|
@ -11,14 +11,14 @@ function Get-IcingaServices()
|
||||||
if ($Service.Count -eq 0) {
|
if ($Service.Count -eq 0) {
|
||||||
$ServiceWmiInfo = Get-IcingaWindowsInformation Win32_Service;
|
$ServiceWmiInfo = Get-IcingaWindowsInformation Win32_Service;
|
||||||
} else {
|
} else {
|
||||||
$ServiceWmiInfo = Get-IcingaWindowsInformation Win32_Service | Where-Object { $Service -Contains $_.Name } | Select-Object StartName, Name;
|
$ServiceWmiInfo = Get-IcingaWindowsInformation Win32_Service | Where-Object { $Service -Contains $_.Name } | Select-Object StartName, Name, ExitCode, StartMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($null -eq $ServiceInformation) {
|
if ($null -eq $ServiceInformation) {
|
||||||
return $null;
|
return $null;
|
||||||
}
|
}
|
||||||
|
|
||||||
[hashtable]$ServiceData = @{};
|
[hashtable]$ServiceData = @{ };
|
||||||
|
|
||||||
foreach ($service in $ServiceInformation) {
|
foreach ($service in $ServiceInformation) {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue