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.
  • 23,930
  • 48
  • 177
  • 302

0 Answers0