0

I am on SCOM 2019 UR2.  I am using the PowerShell Monitoring – Community Management Pack.

I am part way through writing a separate monitor for checking free disk space for the DBA team on their SQL Servers.

I have written a rule that is scheduled to run every 5 minutes.  This is a cut down version:

The parameter I pass within the rule is:

$Target/Property[Type=”MicrosoftWindowsLibrary7585010!Microsoft.Windows.LogicalDevice”]/Name$, 45

When the script runs, $Device will become C: and $Threshold becomes 45.

If I override that with something like this (where I change the end number):

$Target/Property[Type=”MicrosoftWindowsLibrary7585010!Microsoft.Windows.LogicalDevice”]/Name$, 65

Then the script stops working correctly.  It no longer deciphers $Target/Property[Type=”MicrosoftWindowsLibrary7585010!Microsoft.Windows.LogicalDevice”]/Name$ as C:

$Device will become $Target/Property[Type=”MicrosoftWindowsLibrary7585010!Microsoft.Windows.LogicalDevice”]/Name$

but $Threshold becomes 65

Any thoughts please on why this might be?  Thank you.

Peter Svensson answered