diff --git a/icinga-powershell-framework.psm1 b/icinga-powershell-framework.psm1 index 640926c..f29560c 100644 --- a/icinga-powershell-framework.psm1 +++ b/icinga-powershell-framework.psm1 @@ -29,6 +29,15 @@ function Use-Icinga() Import-IcingaLib '\' -Init -Custom; Import-IcingaLib '\' -Init; + $EventLogMessages = Invoke-IcingaNamespaceCmdlets -Command 'Register-IcingaEventLogMessages*'; + foreach ($entry in $EventLogMessages.Values) { + foreach ($event in $entry.Keys) { + Add-IcingaHashtableItem -Hashtable $global:IcingaEventLogEnums ` + -Key $event ` + -Value $entry[$event] | Out-Null; + } + } + if ($LibOnly -eq $FALSE) { Register-IcingaEventLog;