From bd21ea6968aad4101e881624e293f00865c65bd9 Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Thu, 27 Jan 2022 19:24:22 +0100 Subject: [PATCH] Fixes code causing JEA error for ScriptBlocks --- doc/31-Changelog.md | 1 + provider/disks/Get-IcingaPartitionSpace.psm1 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/31-Changelog.md b/doc/31-Changelog.md index ba4d41da..59840861 100644 --- a/doc/31-Changelog.md +++ b/doc/31-Changelog.md @@ -17,6 +17,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic * [#246](https://github.com/Icinga/icinga-powershell-plugins/pull/246) Fixes wrong `UNKNOWN` on `Invoke-IcingaCheckService` while using service display name with the `-Service` argument instead of the service name * [#261](https://github.com/Icinga/icinga-powershell-plugins/issues/261) Fixes `Invoke-IcingaCheckCertificate` which always included the CertStore because no option to not check the certificate store was available * [#262](https://github.com/Icinga/icinga-powershell-plugins/pull/262) Fixes method NULL exception on empty EventLog entries for `Invoke-IcingaCheckEventLog` +* [#271](https://github.com/Icinga/icinga-powershell-plugins/pull/271) Fixes JEA error which detected `ScriptBlocks` in the plugin collection ## Enhancements diff --git a/provider/disks/Get-IcingaPartitionSpace.psm1 b/provider/disks/Get-IcingaPartitionSpace.psm1 index 6056fb75..8bd1825e 100644 --- a/provider/disks/Get-IcingaPartitionSpace.psm1 +++ b/provider/disks/Get-IcingaPartitionSpace.psm1 @@ -4,7 +4,7 @@ function Get-IcingaPartitionSpace() [int]$DriveType = 3 ); - [array]$LogicalDisks = Get-IcingaWindowsInformation Win32_LogicalDisk -Filter ([string]::Format('DriveType = {0}', $DriveType)); + [array]$LogicalDisks = Get-IcingaWindowsInformation Win32_LogicalDisk -Filter ([string]::Format('DriveType = "{0}"', $DriveType)); [hashtable]$DiskData = @{ }; foreach ($disk in $LogicalDisks) {