Powershell Start-Process does not start the process on remote machine
<p>I am working on a piece where I have to start an application and this application should be keep running in background. I tried Start-Process cmdlet as below:</p>

<pre><code>try {
    Invoke-Command -Session $newsession -Scriptblock {
      Write-Host "Cd'ing and starting Vesper on" $loadvm
      Start-Process cmd -ArgumentList "/c C:\vesper_cpt\Vesper.exe -auto" -verb runas
    } -ErrorAction Stop
} catch [Exception] {
    echo "Error while running the remote command", $_.Exception.GetType().FullName, $_.Exception.Message
    Remove-PSSession $newsession
    exit 1
}
</code></pre>

<p>Remove-PSSession $newsession</p>

<p>What is happening is that I can see that it starts a cmd process on the target machine but then it immediately goes away. I am not sure what should I do here to have that process up and running always. On the other hand, I also tried <strong>Invoke-Expression</strong> cmdlet and with this I can see the process has started fine on the remote machine but the powershell script never returns and that is why thought of using Start-Process. Any suggestions?</p>