Hello,

this a problem due to file redirection.
Your first code is near the solution. Add a double quote after /c and at the end of the command
 Code:
$shellline = '%comspec% /c ""D:\Folder\Folder with spaces\Tools\dtexec.exe" /file "' + $ssispackage + '" /de MySecretPassword >"' + $ssisoutput + '""'
_________________________
Christophe