diff --git a/lib/core/perfcounter/Show-IcingaPerformanceCounters.psm1 b/lib/core/perfcounter/Show-IcingaPerformanceCounters.psm1 index 5080aa6..2d2bb80 100644 --- a/lib/core/perfcounter/Show-IcingaPerformanceCounters.psm1 +++ b/lib/core/perfcounter/Show-IcingaPerformanceCounters.psm1 @@ -53,5 +53,5 @@ function Show-IcingaPerformanceCounters() $counters.Add('error', $_.Exception.Message); } - return $counters; + return $counters.Keys; } diff --git a/lib/provider/memory/Get-IcingaMemoryPerformanceCounter.psm1 b/lib/provider/memory/Get-IcingaMemoryPerformanceCounter.psm1 index 49e29e7..fdbf42b 100644 --- a/lib/provider/memory/Get-IcingaMemoryPerformanceCounter.psm1 +++ b/lib/provider/memory/Get-IcingaMemoryPerformanceCounter.psm1 @@ -1,6 +1,6 @@ function Get-IcingaMemoryPerformanceCounter() { - $MemoryStart = (Show-IcingaPerformanceCounters -CounterCategory 'Memory').Keys; + $MemoryStart = (Show-IcingaPerformanceCounters -CounterCategory 'Memory'); $MemoryCounter = New-IcingaPerformanceCounterArray -Counter $MemoryStart; [hashtable]$Result = @{};