PoshCode Logo PowerShell Code Repository

Start-Process (modification of post by view diff)
embed code: <script type="text/javascript" src="http://PoshCode.org/embed/741"></script>download | new post

This is a simple function that can “Start” apps and return the PROCESS object. In particular, it can start URIs, documents, and apps defined in the “App Paths” registry, and basically anything that you could start from the run dialog.

  1. function Start($app,$param) {
  2.    if($param) {
  3.       [Diagnostics.Process]::Start( $app, $param )
  4.    } else {
  5.       [Diagnostics.Process]::Start( $app )
  6.    }
  7. }

Submit a correction or amendment below (
click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:


Remember me