Upgrade PowerShell 7 version

less than 1 minute read

When Microsoft releases a new PowerShell 7 version the following message is displayed in terminal/console:

PowerShell upgrade available

To upgrade to the latest version you can either go to the PowerShell Releases Page or use the following command to upgrade directly from the console:

Invoke-Expression "& { $(Invoke-Restmethod https://aka.ms/Install-PowerShell.ps1) } -UseMSI"

This will start the download of latest PowerShell 7 version and start the installer directly from the current console:

PowerShell Installer Page

The use of the -UseMSI parameter will cause installation to immediately start, when you will be asked chose to close application locking required files this will close the current PowerShell session but installation will progress and once it is over latest PowerShell version will be installed.

Leave a comment