At a hight level, what you would need to do is:
- on the target device, set up the script that runs the commands and outputs the information you want
- on the primary polling engine, create a script (vbscript may be best) that is able to connect to the SolarWinds database and write text into the NOTES field of the alert table
- on the primary polling engine, install PLINK (the command-line version of PUTTY)
- set up a trigger action that launches PLINK against the target device, running the script you want and reading the output, and sending that output through the script in step 2 into the NOTES field of the alert
- A second alert action (with a sufficient delay) would read the ${Notes} variable into your actual message (email, whatever).
You will have replicated the functionality of the APMServiceControl.exe utility that does this for Windows systems.