multithreading - Jobs in powershell -
i using ps-session run console application on remote machine. not want pass control next statement until console application executed. how pass control on console application in powershell? multi-threading option? or need create jobs same?
this command using:
invoke-command -session $session -scriptblock {start-process $args[0] -argumentlist $args[1] -redirectstandardoutput $args[2] -redirectstandarderror $args[3]} -args $dir,$arguments,$stdoutlog,$stderrlog;
here dir consoledirectory(d:\temp\consoleapp.exe)
also, if use -wait command, console application executed control never returns powershell.
Comments
Post a Comment