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

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -