0

How do you get the output from a command?

For simplicity:

$proc = Start-Process ls -PassThru -Wait -ArgumentList '-a' 
$OutPut = $proc.StandardOutput.ReadToEnd()

Error:

<Error retrieving property - InvalidOperationException>
Chris G.
  • 21,107
  • 41
  • 146
  • 258

0 Answers0