Bilal
Bilal

Reputation: 3864

How to set PowerShell 7 as default and remove other versions

I want to set PowerShell 7 as the default shell. So when I shift right click in File Explorer and click on "Open PowerShell window here" in the context menu, I want PowerShell 7 to come up.

And I want to remove completely the other versions.

Is there anyway to do that?

Upvotes: 108

Views: 154612

Answers (4)

ALUFTW
ALUFTW

Reputation: 2492

To make PowerShell 7 the default shell for Windows Terminal, follow these steps:

  1. Click on the down arrow and press settings
  2. A json file will open, and you will see a line near the top that has a parameter called defaultProfile with a UUID. (You may have to click the 'Open JSON file' button first, on the settings UI that opens)
  3. Also you will see a line representing the UUID of the PowerShell 7.0
  4. Copy that UUID and put it in for defaultProfile

Good Luck!

Source:

https://www.codyhosterman.com/2020/05/defaulting-windows-terminal-to-powershell-7-x-core/

The Down Arrow Menu and Settings

Open JSON file button

enter image description here

Upvotes: 71

Alex Balcanquall
Alex Balcanquall

Reputation: 1261

As of 2023.3.30 - for windows 11

  • Install PowerShell from windows store.
  • Open terminal
  • click little dropdown arrow and choose settings
  • change default to the new PowerShell logo (not Windows PowerShell)
  • click save and then close and restart terminal

enter image description here

Upvotes: 18

gaurav joshi
gaurav joshi

Reputation: 165

to change powerShell version in windows 11, follow these steps

  1. Open powerShell and go to setting by clicking down arrow
  2. in Profiles tab (left side in menu) choose Windows PowerShell
  3. edit the Command Line to powerShell Directory Like C:/Program Files/PowerShell/7/pwsh.exe
  4. Save settings

that's it

Upvotes: 0

Denmau
Denmau

Reputation: 351

If you have Windows Terminal: Follow these steps: Click the dropdown and go to Settings

On the General Tab, you will see default profile, click the dropdown and select the profile you would like to be default Windows terminal screen to selext default profile

Upvotes: 25

Related Questions