PowerShell Scripting enables you to create custom performance monitors using Windows PowerShell.
Important: WhatsUp Gold uses a 32-bit (i.e. x86) PowerShell engine. Therefore, only 32-bit PowerShell snap-ins are supported and 64-bit only snap-ins will not function properly. Snap-ins usable in both 32-bit and 64-bit operating systems are configured for 64-bit systems by default and must be manually configured for 32-bit PowerShell engine to function properly with WhatsUp Gold.
The PowerShell Scripting performance monitor requires the following credential:
Configure the PowerShell Scripting performance monitor using the following boxes:
Note: Though the maximum timeout allowed is 60 seconds, Ipswitch does not recommend setting a timeout exceeding 10 seconds. You are encouraged to use the shortest timeout possible.
Note: The use of reference variables in the PowerShell performance monitor is optional. If you do use them, you must use Context.GetReferenceVariable
, for reference variables to be polled and their data graphed. Reference variables simplify your scripting code and enable you to write scripts efficiently, without having to use a list of device properties, as with the Script Action and Script Active Monitor. They manage the underlying SNMP or WMI mechanisms you would normally have to manage in order to access SNMP or WMI counters on a remote device.
By using the Context.GetReferenceVariable
(variable name), you only need to specify the name of a pre-defined variable. WhatsUp Gold uses device credentials and connects to the target device using SNMP or WMI to retrieve the requested information. This information is stored in a variable that you can use later in your script. For more information, see Using the Context Object with Performance Monitors.
Important: The first time that you poll a WMI reference variable that requires two polls in order to calculate an average (such as "Processor\% Processor Time"), it returns "Null."