If I try to use Foreground execution and capture standard out, task result is "The handle is invalid" and the job result is "Failed" and it appears no work was done. If I uncheck "Store standard output" and "Store standard error" the job runs correctly. I can't find any reference to this scenario in the documentation or forums, any idea if this is a bug or an expected behavior?
Thanks.