PowerShell 7 is the latest release from Microsoft, which is an open source, cross platform Shell. You can install it on Windows and Mac & we will go through the steps in this article.
Windows PowerShell 5.1 is no longer being developed and all the feature updates will only land in PS 7 going forward. All versions of PowerShell up until 5.1 could only be used in Windows operating systems. Don’t worry if you have any vendor modules which will only work with PS 5.1 just yet, you can install PowerShell 7 side by side with PS 5.1
Table of Contents
How To Install PowerShell 7 On Windows 10 & 11
There are a number of ways to install PS 7 based on the scenario – using Winget, MSI package, ZIP package, Microsoft Store etc. But the recommended & easiest to use is Winget, which is Windows package manager.
Launch a PowerShell window on the machine and run $PSVersionTable to verify the current version.
Run the command below to search for the latest version of PowerShell. The reason for the search is that there is a preview version as well along with the stable release.
winget search Microsoft.Powershell
Run the command below to run the stable version. If you are more daring, run the second command to install the preview version.
winget install --id Microsoft.PowerShell --source winget
winget install --id Microsoft.PowerShell.Preview --source winget
Winget will invoke the UAC control if required and complete the GUI automatically.
Searching PowerShell on the Windows 10 machine will list both the Windows PowerShell & the new PowerShell 7.
How To Install PowerShell 7 On A Mac
Similar to winget, the recommended way to install PS7 on a Mac is to use the Mac Package Manager HomeBrew. Run the command below to install PS7.
brew install --cask powershell
It does take a minute or more to download PS7 & the installation completion message will be returned.
To launch PS7 on Mac, run pwsh on the Terminal.
You can see that the PowerShell version is 7.2.7 in the screenshot above.
To summarize, we have learned to install PowerShell 7 on Windows & Mac using the easiest & recommended method.