By default, PowerShell is installed in every Windows version – starting from Windows 7 SP1 and Windows Server 2008 R2 SP1. Over the years Microsoft released many versions of PowerShell. Windows PowerShell was built on the .NET Framework and only worked on Windows systems. But recently, Microsoft released PowerShell 7.0 which is generally available to download, and is mainly notable for being a cross-platform Scripting tool. In this post, we will show you how to install PowerShell 7.0 on Windows 11/10.
Install PowerShell 7.x on Windows 11/10
To download and install PowerShell 7.0 on Windows 11/10, you have multiple ways.
Run a PowerShell cmdlet
You can run a PowerShell cmdlet to download and install the MSI package from GitHub.
Here’s how:
- Press Windows key + X to access the Power User Menu.
- Press A on the keyboard to open PowerShell in administrative mode.
- In the PowerShell window, copy and paste the cmdlet below and hit Enter:
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
This command will directly download the package from GitHub URL based on the operating system compatibility.
Once the MSI package is fully downloaded, you’ll be presented with the setup wizard. Click Next and continue the installation process.
Visit Github page
Alternatively, you can visit the GitHub PowerShell release page and scroll down the Assets and choose your operating system with the appropriate architecture, then click to download and then install.
Once the installation is completed, you can see the shortcut on the Start menu. The installed location is C:\Program Files\PowerShell\7 for Windows.
PowerShell 7 installs to a new directory, enabling side-by-side execution with Windows PowerShell 5.1. The install locations by version are:
- Windows PowerShell 5.1: $env:WINDIR\System32\WindowsPowerShell\v1.0
- PowerShell 6.x: $env:ProgramFiles\PowerShell\6
- PowerShell 7: $env:ProgramFiles\PowerShell\7
You can also access the PowerShell 7.0 via Run command. To do so, invoke the Run dialog box by pressing Windows + R and type pwsh and hit Enter, this command will launch the new PowerShell.
Via Microsoft Store
Visit the Microsoft Store to download and install PowerShell.
Using winget command
Open Command Prompt as administrator, type the following command to install PowerShell 7.x, and hit Enter:
winget install --id Microsoft.PowerShell
Windows Package Manager will download and install the latest version of PowerShell on your computer.
This post on microsoft.com offers additional information on installing PowerShell on Windows.
PowerShell 7.0 ships with a lot of new features like:
- Pipeline parallelization
- New operators
- ConciseView and Get-Error cmdlet
- Automatic new version notifications
- Invoke DSC resources directly from PowerShell 7
- Compatibility layer.
We hope you found this post useful.
Read next: List of PWSH syntax you can use.