Thanks LucD.
We too are tried similar to what you had described above.
The output of the script being stored in a variable:
Example:
$output_str = invoke-vmscript < ifconfig >
If we log the output_str or access for parsing, the script proceeds further.
However the stream which is being used by C# code is not getting anything from then on.
Only If we comment out the logging and parsing, the stream is properly going back to C# code.
Then, we modified the above line like:
$output = invoke-vmscript < ifconfig >
$output_str = $output.ScriptOutput
$f1 = parse ($output_str)
#Log $f1
Then, the parsing is working and c# is able to read the stream properly.
The problem is if I uncomment the “Log $f1”, again we don’t see anything in the stream at C# end.
Not sure what is happening here.
Regards,
Arvind S