Coming Soon: GET:IT Endpoint Management 1-Day Conference on September 28th at 9:30 AM ET Coming Soon: GET:IT Endpoint Management 1-Day Conference on September 28th at 9:30 AM ET

How to Upgrade to PowerShell 7

In the first half of 2019, Microsoft introduced the next version of PowerShell known as PowerShell 7. PowerShell 7 is the latest version of the popular scripting/automation/development language stemming from the previous version of PowerShell Core 6.2.

PowerShell 7 brings about many changes like now using .NET Core 3.0, trimming the gap between Windows PowerShell and PowerShell Core functionality, simplifying credential management and more. All of these updates are great but how do you leverage them if you’re still using Windows PowerShell or PowerShell Core 6.x? Let’s find out! Although PowerShell 7 is supported on nearly all platforms, we’ll be sticking with Windows in this article.

The path to PowerShell 7 will start one of two ways – either with Windows PowerShell or an older version of PowerShell Core.

Note that I will use PowerShell and PowerShell Core interchangeably in this article. As of PowerShell 7, Microsoft has chosen to drop the ‘Core’ moniker completely. PowerShell 7 is a direct path upgrade from PowerShell Core 6.2.

Sponsored Content

Say Goodbye to Traditional PC Lifecycle Management

Traditional IT tools, including Microsoft SCCM, Ghost Solution Suite, and KACE, often require considerable custom configurations by T3 technicians (an expensive and often elusive IT resource) to enable management of a hybrid onsite + remote workforce. In many cases, even with the best resources, organizations are finding that these on-premise tools simply cannot support remote endpoints consistently and reliably due to infrastructure limitations.

Upgrading from Windows PowerShell

Upgrading isn’t a fair term when referring to Windows PowerShell 5.1 and PowerShell 7. PowerShell 7 can exist completely separate from Windows PowerShell on the same Windows system. This is a big benefit allowing you to slowly wean yourself off of Windows PowerShell rather than all at once.

There are a few ways you can install PowerShell 7. You can use the MSI via the PowerShell GitHub releases page or by using Windows PowerShell.

Installing PowerShell 7 via an MSI

Installing PowerShell 7 via an MSI first requires downloading the MSI from GitHub. You can do that by finding the latest version here and walking through the wizard. Since it’s an MSI, you’ll see the familiar wizard. Stepping through the default options is sufficient to get PowerShell 7 installed.

Installing with Windows PowerShell

If you’d rather use PowerShell to install PowerShell you can use the Invoke-RestMethod cmdlet. Using this cmdlet, you can download and execute an installer script provided by the PowerShell team. Below you will see a code snippet on how to do this in Windows PowerShell.

In the below snippet, Windows PowerShell is downloading the install-powershell.ps1 script and executing it. It’s executing the script with Invoke-Expression passing the UseMSI and Preview parameters. At the time of writing, the Preview parameter is required since PowerShell 7 is in preview but this might not be the case at a later time.

Invoke-Expression "& { $(Invoke-Restmethod } -UseMSI -Preview"

For more information with an in-depth walkthrough on each method, check out the article, Upgrading to PowerShell 7: A Walkthrough.

Upgrading from PowerShell Core

Not only can you install PowerShell 7 side-by-side with Window PowerShell, but you can also do the same with previous versions of PowerShell Core as well. Using one of the methods above to execute the PowerShell 7 MSI on the computer, PowerShell 7 will install with PowerShell Core.

When the PowerShell 7 installer completes, you’ll find two folders in C:\Program Files\PowerShell called 6 and 7-preview (for the preview version). Each folder stores a completely different version.

PS51> Get-ChildItem -Path 'C:\Program Files\PowerShell\'

    Directory: C:\Program Files\PowerShell

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        9/12/2019   2:54 PM                6
d-----        9/25/2019  11:05 AM                7-preview
d-----       12/17/2018   1:32 PM                Scripts

Although unconfirmed at this time, it is believed that when PowerShell 7 comes out of Preview, the GA version will create a folder called 7. This will then be where all minor version upgrades to PowerShell 7 will be applied overwriting the last version.


Upgrading to PowerShell 7 on Windows is easy using the MSI installer. The most important thing to know is that unlike Windows PowerShel, PowerShell 7 is a standalone package. Don’t immediately assume that you have the latest version of PowerShell on a new Windows 10 machine. You will always have to manually install the MSI package to get the latest and greatest features.

Related Topics:


Don't have a login but want to join the conversation? Sign up for a Petri Account

Comments (0)

Leave a Reply

Entrepreneur, hustler, husband, dad, Automator, content producer, published author, Microsoft MVP, DevOps pro and passionate problem-solver.