Does powershell have an equivalent to popen? -
i need able launch process , read output variable. based on return of command can choose show full output or selected subset.
so clear, want launch text based process (psexec actually) , read output command (stdout, stderr, etc) variable rather have directly outputted console.
you left off details regarding kind of process, think this article powershell team blog has whatever you'd do, either piping executable's output somewhere or utilizing system.diagnostics.process
.
now second option sounds want do, can use processstartinfo
class feed in true
redirectstandardoutput
property, , read standardoutput
property of process
object whatever want output. standarderror
works identically.
Comments
Post a Comment