Skip to content

How to Install PowerShell 7 With Winget

Installing packages with Winget is usually a straightforward task. However, when it comes to PowerShell 7, we need a little additional option to get everything correctly set-up.

The problem with Windows Terminal

If we install PowerShell 7 the usual way, everything works as expected – except we do not get an entry into the Windows Terminal. We could go and make an entry into the JSON settings file, but we would need to know what exactly to put where.

If you already installed PowerShell 7 and miss the entry in the Terminal, you can uninstall it like this:

winget uninstall Microsoft.Powershell

Install with the installer-type option

When we add the option to use the WIX installer-type, we get PowerShell 7 correctly installed – including the entry in Windows Terminal:

winget install Microsoft.Powershell --installer-type WIX --source winget

Manually add the entry to Windows Terminal

If we have PowerShell installed but do not find an entry in Windows Terminal, we can add it manually. Open the Settings dialog and use the option at the bottom of the window to open the settings as a JSON file. In the file we need to locate the "list" property and add this entry at the end:

1
2
3
4
5
6
{
    "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
    "hidden": false,
    "name": "PowerShell",
    "source": "Windows.Terminal.PowershellCore"
}

Conclusion

It is a disappointment that the PowerShell installer for Winget does not add the correct entry in Windows Terminal. One would expect a better compatibility between the 3 involved Microsoft products. Luckily for us, there are workarounds that gives us the correct settings.