How to utilize powershell to open an application with a command?

Notepad runs in this way not because of any Powershell magic, but because notepad.exe exists in one of the directories specified in your $env:PATH environment variable. The system behaves the same as when using cmd.exe (Command Prompt) in this regard.

You can start any application by specifying the full path to its executable: C:\Program Files\FileZilla FTP Client\filezilla.exe. You can optionally use Start-Process with the EXE if you want to capture a reference to the executable to gain more control over it from Powershell.


Start-Process -FilePath "path.exe"

I know this is an old thread, but if you are trying to open a file you can do it like this

& .\filename.ext

It will use the standard program to open the file

Tags:

Powershell