Keeping a Handle to a Process

by Feb 21, 2014

When you launch an EXE file, PowerShell will happily start it, then continue and not care about it anymore:

If you'd like to keep a handle to the process, for example to find out its process ID, or to be able to check back later how the process performs, or to kill it, use Start-Process and the –PassThru parameter. This returns a process object:

Twitter This Tip! ReTweet this Tip!