Can a PowerShell script be used to pass information into my email alerts, much like the way you can use the ${Notes} variable together with SolarWinds.APM.RealTimeProcessPoller.exe to include top process information?
If the PowerShell script monitor is the item that is responsible for triggering the alert then yes, you can return the statistic value of the PowerShell Script Monitor "${StatisticData}", as well as the optional message value returned by the script "${ComponentMessage}".
In this scenario, I want to trigger it as an external program to gather information like SolarWinds.APM.RealTimeProcessPoller.exe gathers top 10 process information. I'm just looking for a way to include top 10 processes with associated user name for each process. SolarWinds.APM.RealTimeProcessPoller.exe doesn't include user name info.
This can be done in the same/similar fashion as the SolarWinds.APM.RealTimeProcessPoller.exe using the Orion SDK/API. Execute the PowerShell script as part of the alert Trigger Action - Execute an external program (note that 32bit PowerShell will be used). You will then return the output/result of the script to the "Notes" field via the Orion SDK. Next you will have a secondary email alert action with a 1-2 minute delay so we can wait for the script to execute and complete with the expected results. This email alert would be configured to send an email alert notification that includes the "${Notes}" field of the alert as part of the message body text.