I have line in a psadt script I use to deploy R addons:
Execute-Process -Filepath "$path" -Arguments "--no-save --no-restore --verbose `"$dirFiles\install_R_modules.r`" `>` `"$configToolkitLogDir\R_Package_Installer.log`"" -IgnoreExitCodes 1 -PassThru
However by default the .net method it uses to execute processes seems to trap stdout. The option shellexecute doesn’t seem to help either. Any suggestions?