One thing missing from the SSIS PowerShell task is the ability to write *from within the script* to SSIS variables. Here's an example:
# here we'll set a Powershell variable within the script
$d=get-date -f yyyyMMddHHmmss
$filename="/path/to/folder/file_$d"
# We'd like to use this filename variable--which was created within the PS script--in SSIS later
# so we want to be able to do something like this (which doesn't work):
<@User::SSISFilename>=$filename1
<other PowerShell stuff happens here, including file creation and population>
One of the problems with using the "results to variable" functionality is that what we're trying to accomplish here doesn't actually have anything to do with the PowerShell results.
One could imagine other use-cases, in which one does (for instance) a get-aduser
or similar cmdlet that returns a subset of user data, and you store the affected user bits in a variable. However, you're not done: the point of the script isn't to get the username, but to disable, or re-enable, or add to a group, or something altogether different. But you want to pass back to SSIS the affected username so that you can do other ssis-y stuff with that username, too.