Is there a command that exists that will open any application from PowerShell?
When typing in "notepad", this will open Microsoft Notepad. However, other applications do not seem to open this way.
Is there a command that exists that will open any application from PowerShell?
When typing in "notepad", this will open Microsoft Notepad. However, other applications do not seem to open this way.
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.
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
Start-Process
is the commandlet you are looking for.
The simplest method that I know of is using the AppId of the application:
Open powershell as Administrator
See all the App-IDs via this command
Get-StartApps
Note the AppID of app you want to open
in our case we have to open VoiceRecoder
Finally, open Voice Recorder via AppId
explorer shell:appsFolder\Microsoft.WindowsSoundRecorder_8wekyb3d8bbwe!App
AppIds are mostly the same between systems