I'm having problems with entering a VB script as a threshold script. It looks fine to me but when I close the dialog, I'm still getting a little red x in the dialog bottom right corner with tooltip "This field must not be empty. Specify a valid value." What am I missing? I can't find any official examples of the VB scripts.
Since this is my first venture into "thresholding by scripts", the script is nothing but me getting familiar with how things work. You can find it below:
Set nbiSource = Policy.Source("XYZ")Dim msgText = "policy name = " & Policy.Name()Dim instanceCounter = 0While( instanceCounter < nbiSource.InstanceCount() )msgText = msgText & " instance " & instanceCounter & ": " & nbiSource.NameOf(instanceCounter) & "(" & nbiSource.ValueOf(instanceCounter) & ")"instanceCounter = instanceCounter + 1WendConsoleMessage.MsgText = msgTextConsoleMessage.Severity = "Normal"ConsoleMessage.Application = "Test"ConsoleMessage.Send()Rule.Status = false