From the docs on the Process object it will only allow you to start & stop local processes. Therefore if you want to start & stop remote processes then you need to use either PowerShell remoting or a tool like psexec. I see your C# comments indicate you would set up a remote runspace. That works great if you have PowerShell v2 on each remote computer, have remoting enabled, preferably are on a domain and have the appropriate admin credentials. IIRC the C# process setting up the remote runspace must run as admin and the credentials it uses must have admin rights on the remote computer (unless you've set up special remoting endpoints on each of the remote computers).
If you do have PowerShell v2 or v3 on each remote computer and can enable remoting (just run Enable-PSRemoting -force) then you should easily be able to do what you want. However, there is no need to drop down to use the .NET Process object. Just use PowerShell cmdlets. Put something like this in a script, add that to the pipeline your create and invoke that.
$p = Start-Process Echo.exe -Arg "output from echo.exe" -PassThru
$p | Wait-Process -Timeout 3 # 3 seconds
if (!$?) { # Success code $? returns $false if Wait-Process times out
$p | Stop-Process
}
For async support, try it this way:
$script = {
$pid
ipconfig.exe /all
$LastExitCode
}
$job = Invoke-Command localhost $script -AsJob
do {
Receive-Job $job
}
while (!(Wait-Job $job -Timeout 1))
Receive-Job $job
Remove-Job $job
With the returned $pid, you can use that along with WMI to find all the child process to kill them if necessary like so:
$childPids = @(Get-WmiObject -Class Win32_Process -Filter "ParentProcessID=$PID" |Select-Object -Property ProcessID)