How to update to PowerShell 7.0 on Windows 10
PowerShell 7.0 is available on the stable release. Windows 10 force-updates users to a lot of things e.g., Chromium Edge but, it will not force update you to PowerShell 7.0, not yet anyway. If you’d like to update to PowerShell 7.0, you can do one of two things; run the installer on its Github page, or install it from PowerShell.
Update to PowerShell
If you want to update to PowerShell via the installer, visit the PowerShell Github page. Go to the Releases tab and look for the file with the MSI file extension. Make sure you download the 64-bit version if you’re running 64-bit Windows. Run the installer like you would any other installer and it will take care of everything for you.
If you’d like to update PowerShell from inside the app itself, open it with admin rights. Run the following command. You do not need to modify the command in any way. Run it as it is.
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
The command will first download the installer from the PowerShell Github page. For a while, it may seem like it isn’t doing anything but it is downloading the file.
You will then be walked through the set-up which is going to be the same that you get with the MSI file. You can choose to add PowerShell to the context menu during the update process. Allow the installation to complete. It won’t take more than a few minutes on a moderately powerful system. On slower systems, it might take up to fifteen minutes.
When the update is complete, you will see a new PowerShell window and at the top, the version number will be updated.
If you’d like to know what’s new in PowerShell, you can go to the Github page where the changes have been listed. The changes don’t indicate a change that might impact how you work with it. There’s nothing that you will need to tweak in any PowerShell script to make it compatible with PowerShell 7.0. The update does have new features but they add functionality to existing features and expand on some of PowerShell’s best commandlets.
If you need to run the older version of PowerShell i.e., 5, you can run the following command in the run box (tap Win+R to open the run box).
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Version 5
You can change the number at the end from 5 to 2 to run PowerShell 2.0. PowerShell 7.0 is installed alongside PowerShell 5. To open PowerShell 7, search for it in Windows search, or go through the apps’ list in the Start menu. It has a different icon than PowerShell 5 and should be easy to find.
I’m confused and new to PowerShell. Which version is the original install of PowerShell on my Win 10 box? This folder structure “C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Version 5” says v1.0 but at the end Version 5.
Appreciate a clarification. Thanks.
Frustrating title for this article –
Installing Powershell 7,0 is not an update to Powershell 5. It is an entirely new product. Now that PS7 has been out in a while and there is a new version, everyone will want to know how to *update* Powershell 7. Do you have to re-run the MSI each time there is a minor update?
Finding an answer with certainty is very frustrating as all Google results point to articles on first-time installation like this one.
Despite what powershell.exe help might say, -Version does work the way you describe. The only version you can specify is 2 and even then you need to have the PowerShell 2.0 engine optional feature installed. The version parameter was introduced back with PowerShell v3 to provide backwards compatibility.