
Graham Pritchard (Customer) asked a question.
How can I reference device attributes in a PowerShell script monitor?
For example:
All devices of a certain type have an attribute of "SerialNumber" in the WUG device properties.
I want to pass the SerialNumber to an external API from a PowerShell script. How can I reference the SerialNumber attribute in a Powershell script?
The percent variable for Attributes is NOT available in PowerShell. However, you can get it via the API. This is using the WhatsUpGoldPS PS modul which makes coding so much easier.
Actually, you can access the Percent Variables for attributes in Powershell.
Example:
$attributeValue = "%Device.Attribute.SerialNumber "
However, please note that there is a space after SerialNumber. Without that space, the attribute won't be parsed.
Yes, for PowerShell Actions, but not PowerShell Monitors.