Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 350
Bilal Avatar asked Mar 02 '21 21:03

Bilal


People also ask

Is PowerShell 7 installed by default?

Windows PowerShell comes installed by default in every Windows, starting with Windows 7 SP1 and Windows Server 2008 R2 SP1. If you are interested in PowerShell 7 and later, you need to install PowerShell instead of Windows PowerShell. For more information, see Installing PowerShell on Windows.

Is PowerShell 7 backwards compatible?

Improved backwards compatibility with Windows PowerShell PowerShell 7.0 marks a move a to . NET Core 3.1, enabling significantly more backwards compatibility with existing Windows PowerShell modules.

How do I change PowerShell version?

There are two ways to upgrade: You can download the PowerShell Core MSI installer manually from GitHub; You can download and install (update) it directly from the PowerShell console.


1 Answers

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.
  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/

like image 167
ALUFTW Avatar answered Sep 17 '22 15:09

ALUFTW