How to Install PowerShell 7 on Windows 10

Avatar PowerShell header 7.Microsoft

Microsoft ad PowerShell 7.0 March 4, 2020. This is the last major update for PowerShell, Microsoft’s command line environment and cross-platform scripting language. Here are the new features and how to install it on your Windows PC.

What’s new in PowerShell 7?

The latest version, PowerShell 7, builds on the previous PowerShell Core 6.1. It continues to support cross-platform deployment and adds a large number of new features, cmdlets, and bug fixes. Some of the most important new features include:

Pipeline parallelization with ForEach-Object: Browse the elements of a collection in parallel with the new -Parallel parameter or define a maximum number of threads (the default value is five) with the -ThrottleLimit parameters.
The addition of new operators:
Ternary operator “? : ”: Works a bit like an if-else statement by comparing two expressions to a condition to see if it’s true or false, for example, Test-Path” C: Users “? “exists”: “does not exist”
Pipeline chain operators “||” and “&&”: the operator && executes the right pipeline if the left pipeline succeeds. Conversely, the || The operator runs the right pipeline only if the left pipeline fails.

Get-Error cmdlet: A simplified and dynamic error view for an easier search of the most recent error of the current session.
Automatic notifications of new version: Notify users when a new version of PowerShell is available. The default update checks for a new version once a day.

In addition to the new features listed above, Microsoft has added many other cmdlets, experimental enhancements, and added PowerShell 7 to its long-term maintenance release, which will allow it to receive updates as long as .Net 3.1 is supported. A complete list of new features, fixes and improvements is available on the site Github Change Log for PowerShell 7.

RELATED: Differences Between PowerShell and the Windows Command Prompt

How to install PowerShell 7 with an MSI package

PowerShell 7 is available for Windows, macOS and Linux. We will show you how to install it on Windows 10.

The first method that we are going to cover uses an MSI file to install PowerShell. MSI packages work almost identically in an EXE file and allow you to install a program using a graphical user interface. This is an installation method that uses only the necessary and basic files needed. Simply double-click on the package to launch the configuration wizard.

Note: PowerShell 7 installs and runs side by side with Windows PowerShell 5.1 – the version provided with Windows 10 – and replaces PowerShell Core 6.x. If you need to run PowerShell 6 side by side with PowerShell 7, you will need to install it via the ZIP package.

To download the package, launch your browser and go to the PowerShell Github versions page. Scroll down to the Assets section and click on the MSI package version to download it.

Select the package that suits you.

Be sure to select the correct package for your version of Windows, x64 for 64-bit systems and x86 for 32-bit systems. If you don’t know which one you have, it’s easy to find out which is running your system.

RELATED: How do I know if I’m running 32-bit or 64-bit Windows?

If prompted, choose a destination for the download and click “Save” to start the download.

Once the download is complete, navigate to the folder where the file is located and double-click it to run the installation.

Find the MSI package and double-click it to open and run the wizard.

How to install PowerShell 7 with a command

The PowerShell team also mount a script you can invoke directly from PowerShell. It is a single-line cmdlet that automatically downloads and runs the configuration wizard. All you have to do is paste the code snippet and hit the Enter key.

Launch PowerShell and copy / paste the following cmdlet into the window:

iex “& {$ (irm} -UseMSI”

Type the following command to download the MSI package from PowerShell.

Press the Enter key and PowerShell will execute the command and start the download.

Press Enter and the package will be downloaded.

Go through the installer

When the configuration wizard opens, click “Next” to install PowerShell 7.

On the next screen, choose a destination folder, then click “Next” when you’re ready to continue.

Then you decide which optional features to activate during installation. You can enable or disable the following four options:

Add PowerShell to the Path environment variable: Adds PowerShell to the Windows Path environment variable and allows you to call PowerShell from any other shell or terminal.
Save the Windows event log manifest: Adds PowerShell to the Windows Event Log manifest and allows you to log events from a PowerShell instance.
Activate PowerShell remote communication: Allows remote commands to be executed.
Add the “Open here” context menus to the explorer: Adds an option from the right-click context menu that opens an instance of PowerShell in the folder you click.

Click “Next” after choosing all the optional features you want.

Click “Install” to begin the installation. A UAC prompt appears, requesting administrator privileges to install the package. Click “Yes” to continue.

Once the configuration wizard is finished, click on “Finish” to exit.

How to open PowerShell 7

After installation is complete, there are several ways to open PowerShell 7.

If you have selected the options “Add PowerShell to the Path environment variable” and “Add the context menus” Open here “to the Explorer”, you can type “pwsh” in the command prompt or click with the button right on a folder and click on PowerShell 7> Open here. However, one of the simplest methods is to search using the Start menu.

Press the Windows key or click the Start button, type “pwsh” in the text field, then press Enter or click “Open” when PowerShell 7 appears in the results.

Search for PowerShell in the Windows search bar.

You will know that you are using the current and updated version of PowerShell by searching for “PowerShell 7” in the title bar of the window.

Make sure you are running PowerShell 7 in the upper corner of the program.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.