Scott Hanselman

How to make Command Prompt, PowerShell, or any Shell launch from the Start Menu directly into Windows Terminal

March 25, 2021 Comment on this post [11] Posted in Win10
Sponsored By

I love the Windows Terminal, but right now I launch the Terminal, then I pick a Shell (PowerShell, CMD, bash, etc) from the menu. Sometimes I want to be "shell-first."

I'll hit the Start Menu, type cmd, and then the older console/terminal starts up. I have to remember to run Terminal THEN run cmd. So I said to myself, "self, what's a good way to fix that?"

When you press Start and start typing (which is different from WinKey+R and running a .exe directly) you're looking at Shortcuts/LNK files. You can make your own and change existing ones.

Press Start, type "Command Prompt" or "PowerShell" and then RIGHT CLICK the icon and Open File Location.

PowerShell in the Start Menu

For example, Command Prompt was here on my machine:

C:\Users\scott\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools

So I Ctrl+C, Ctrl+V to make a copy (backup) or I can just right click and hit properties to change the one I have.

Then I change the Target to wt.exe (Windows Terminal) and pass in the Named Profile for the Shell I want:

C:\Users\scott\AppData\Local\Microsoft\WindowsApps\wt.exe -p "Command Prompt"

In this case, it's Command Prompt. I also renamed my LNK file to Command Prompt (Terminal) but that's optional.

Command Prompt in Terminal

I can do the same thing for PowerShell. I've moved to open source PowerShell 7 (based on .NET Core) that I installed from the Windows Store.  Some store apps don't want you to change their icons so I just changed another. You can also make your own with right-click, New Shortcut.

PowerShell in Terminal

I even did this with the Visual Studio 2019 Developer Prompt by first making a Profile for it in my Terminal settings:

{
"commandline": "C:\\WINDOWS\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe -noe -c \"&{Import-Module \"\"\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\Common7\\Tools\\Microsoft.VisualStudio.DevShell.dll\"\"\"; Enter-VsDevShell 4f53a196}\"",
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff45ce}",
"hidden": false,
"name": "VS2019 Dev Prompt",
"startingDirectory": "%USERPROFILE%"
},

and then changing the icon to call it with wt.exe and the named profile. This can also work with Cygwin, Yori, Ubuntu, or any other shell.

A few minutes and a few shortcut changes later, now I can hit start, type PowerShell, command, cmd, whatever, and it'll all load in Windows Terminal!

Windows Terminal for All

Since this technique works only with lnk files that the Start Menu consumes, it also works with PowerToys Run (which is like Quicksilver or Spotlight on Mac)!

PowerToys Run is like Quicksilver for Mac

Hope this helps!


Sponsor: The No. 1 reason developers choose Couchbase? You can use your existing SQL++ skills to easily query and access JSON. That’s more power and flexibility with less training. Learn more.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
March 27, 2021 2:06
Is there some way to remove the 1.0 version of powershell? After updating the shortcut, typing "powershell" now defaults to the one at "C:\Windows\System32\WindowsPowerShell\v1.0", which obviously isn't the one I want.
March 27, 2021 2:10
Any idea how to install Terminal when the Store is blocked on your machine?
March 27, 2021 6:05
If the Windows Store is blocked, you can get Windows Terminal from the GitHub release page at https://github.com/microsoft/terminal/releases
March 27, 2021 12:57

I am happy to find this post Very useful for me, as it contains lot of information. I always prefer to read Thanks.
A very amazing post thanks for sharing with us.
March 27, 2021 17:17
@Chris
Download the bundle from https://github.com/microsoft/terminal/releases and double click on it. Yes, it's that easy.
March 29, 2021 4:27
How can I run a command and not exit the console app? For example, I can type: wt -p ap help.
ap is a profile that runs a .net console app that accepts commands. If I run it normally, I can continue typing commands until I exit, but if I run a command like 'help' above then it exits when done.
March 29, 2021 6:47
Is there a way to do this without making a profile in Terminal settings first?
March 30, 2021 14:16
Thanks for sharing this useful information with us. These are all helpful for us to learn something new & unique. We also from the same niche. We offer the best Web Development services in India.
March 30, 2021 14:59
This is great. Had the same issue myself with CMD prompt but never occurred to me to try resolve it like this. Thank you!
March 31, 2021 2:58
Fantastic. I had to use the following to get the visual studio to work

"commandline": "C:\\WINDOWS\\SysWOW64\\WindowsPowerShell\\v1.0\\powershell.exe -noe -c \"&{Import-Module \"\"\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Common7\\Tools\\Microsoft.VisualStudio.DevShell.dll\"\"\"; Enter-VsDevShell -VsInstallPath \"\"\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\"\"\" -SkipAutomaticLocation}\""

It wouldn't work without the path. Hope this helps someone.
April 03, 2021 10:23
Starting with Terminal 1.7 (preview currently) we can also make it open in an already open windows terminal as a new tab, instead of getting a new instance each time.

In the settings you can change the behaviour:
For now, the default is to launch in a new window. Available options include launching in "a new window", "a window on the same desktop", "any existing window"

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.