I have a piece of script with the following line:
myBinary.exe --param1 a -param2 b | Tee-Object -Variable "myVar"
It used to stream the output just fine. Now that I moved this line into a function, it no longer streams to standard out and only populate the variable myVar.
Any idea how to get around this issue?