Merge pull request #839 from Icinga:fix/agent_installation_lookup_for_missing_attribute

Fix: Icinga Agent installation lookup on missing registry attributes

Fixes registry lookup for Icinga Agent installation to check if the required `DisplayName` attribute is defined before checking
This commit is contained in:
Lord Hepipud 2025-11-20 15:48:30 +01:00 committed by GitHub
commit 93ac71922f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -13,6 +13,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
### Bugfixes
* [#833](https://github.com/Icinga/icinga-powershell-framework/issues/833) Fixes registry lookup for Icinga Agent installation to check if the required `DisplayName` attribute is defined before checking
* [#835](https://github.com/Icinga/icinga-powershell-framework/pull/835) Fixes JEA compiler to always enforce a rebuild of the Framework to ensure integrity of JEA profiles
* [#836](https://github.com/Icinga/icinga-powershell-framework/issues/836) Fixes Metric over Time collector not working on Windows 2012 R2 and older

View file

@ -12,6 +12,10 @@ function Get-IcingaAgentInstallation()
$RegistryData = Get-ItemProperty $regPath;
$IcingaData = $null;
foreach ($entry in $RegistryData) {
if ($null -eq $entry -or $null -eq $entry.DisplayName) {
continue;
}
if ($entry.DisplayName -eq 'Icinga 2') {
$IcingaData = $entry;
break;