windowspowershell

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?


Solution

  • 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