Celeb Glow
general | March 08, 2026

How do I make a Windows shortcut run an exe in a PowerShell window?

I've been recently using Blender, but it seems that some errors are only printed to the console. If I manually open PowerShell and run Blender from there, it works fine and I can read the error messages. However, I'd like to change my shortcut to do this for me.

Basically I'm trying to run an arbitrary command in PowerShell, from a shortcut. I found this question which hasn't helped; I have tried putting these in the "Target" section, to no success:

powershell "C:\Program Files\Blender Foundation\Blender\blender.exe"
powershell Invoke-Expression "C:\Program Files\Blender Foundation\Blender\blender.exe"
Invoke-Expression "C:\Program Files\Blender Foundation\Blender\blender.exe"

The first two pop open a black command window for a moment which immediately disappears, and also powershell is replaced with C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe when I hit "Apply" but I figured I'd include the shortened version here.

The third says "The name 'Invoke-Expression' specified in the Target box is not valid.".

I also came across this question, so I tried adding -NoExit -Command:

powershell -NoExit -Command "C:\Program Files\Blender Foundation\Blender\blender.exe"

This pops up a window with the message C:\Program : The term 'C:\Program' is not recognized as the name of a cmdlet, function, script file, or operable program. I find it strange that it gets stuck at the space even though I quoted the path. I also tried using a set of single quotes too:

powershell -NoExit -Command '"C:\Program Files\Blender Foundation\Blender\blender.exe"'
powershell -NoExit -Command "'C:\Program Files\Blender Foundation\Blender\blender.exe'"

This just results in a PowerShell window opening to a command prompt, printing out the command I wished to execute instead of actually executing it:

C:\Program Files\Blender Foundation\Blender\blender.exe
PS C:\Program Files\Blender Foundation\Blender>

How do I run a command / executable in PowerShell from a shortcut?

5

1 Answer

You may use the following syntax:

powershell Start-Process 'C:\Program Files\Blender Foundation\Blender\blender.exe'

Start-Processexecutes a program, returning the process object of the application. It allows you to control the action on a file and control the environment in which the app is run. You also have the ability to wait on the process to end and subscribe to the process Exited event.

For PowerShell to use the console for output, add to the Start-Process call the parameter of -NoNewWindow, defined as: "Start the new process in the current console window. By default PowerShell opens a new window."

For more options, see the TechNet articlePowerShell: Running Executables.

10

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy