We are testing a flow in which a 'syscmd' node executes a PowerShell script to process data files and then extract values from a logfile. These values will be used by other nodes in the flow to determine what actions should be taken. Currently, the "Return" command is being used to pass the data back to the 'syscmd' node. When the developer reviews the variables associated with the 'syscmd' node, the OutputData variable contains all the information that was written by the script's 'Write-Host' commands, as well as the value passed by the 'Return' command at the end of the dialog.
What is the best solution that will allow the information written by the 'Write-Host' commands to still be visible, but allow the data passed by the 'Return' command to be saved into a variable that can be used by other nodes in the flow?