This was done based on some posts related to getting data into SAM from external sources. For example when SAM itself cannot run code to get to the data.
For a proof of concept create a Windows Powershell Monitor with the attached code in ps_pipe_1.txt. You want to test the script output against a device where you know the poller name. So get the script output, select your device and no authentication should be needed. From a second computer you'll run the code ps_pipe_2.txt (you'll need to rename it to .ps1 for Powershell to work.) You'll also need to edit the first line and change the "POLLER_WHERE_SCRIPT_IS_RUNNING" to your poller name. The script generates a random number. You should see that in the Output Results of your Powershell monitor.
Enjoy,
Steve