title: Launching background tasks in a remote session that don't get killed when the session is removed
body: <p>I have been using <code>PsExec -d</code> to launch console applications in a remote powershell session because I want these apps to run in the background while I perform some task. The problem is that I want the background applications to continue running even if I kill the remote powershell session with <code>Remove-PSSession</code>. What happens currently is once the remote powershell session is killed so are all the processes that were started with the help of <code>PsExec -d</code>. I'm guessing it has something to do with process trees and how windows manages the lifetime of such things.</p>
  
  <p>Does anyone have any idea how I can launch a remote background process and have that process persist even after the remote session is killed?</p>