How to Update PowerShell in Windows 11

PowerShell is a powerful command-line shell and scripting environment included with Windows 11. It can be used to manage files, configure Windows settings, automate repetitive tasks, troubleshoot problems, and administer computers. Windows 11 includes Windows PowerShell 5.1, while Microsoft also offers the newer PowerShell 7 as a separate, modern version.

Updating PowerShell is useful when you want newer commands, improved performance, updated security features, and compatibility with newer scripts and modules. PowerShell 7 can be installed alongside Windows PowerShell 5.1, so installing it does not normally remove the older version.

You can update PowerShell using several methods, including the Microsoft Store, Windows Package Manager, PowerShell itself, or a manually downloaded installer. The easiest method depends on which version you currently have and how you prefer to manage applications.

Method 1: Check Your Current PowerShell Version

Before updating PowerShell, check which version is installed.

  1. Open Start.
  2. Search for PowerShell.
  3. Open Windows PowerShell.
  4. Enter:
$PSVersionTable
  1. Press Enter.

Look for the PSVersion value.

For example, you may see:

Major  Minor  Patch
-----  -----  -----
5      1      ...

Windows PowerShell 5.1 is built into Windows 11. If you have PowerShell 7 installed, its version will normally begin with 7.

PowerShell 7 is a separate application and does not simply replace Windows PowerShell 5.1. You can therefore have both versions installed on the same computer.

Method 2: Update PowerShell Using Windows Package Manager

Windows 11 includes Windows Package Manager, commonly used through the winget command.

This is one of the quickest ways to install or update PowerShell.

  1. Open Start.
  2. Search for Windows Terminal.
  3. Right-click it.
  4. Select Run as administrator.
  5. Enter:
winget search Microsoft.PowerShell
  1. Find the PowerShell package.
  2. To install the latest available version, run:
winget install --id Microsoft.PowerShell

If PowerShell is already installed and you want to update it, you can use:

winget upgrade --id Microsoft.PowerShell

If an update is available, Windows Package Manager will download and install it.

After installation, close the existing PowerShell window and open the newer PowerShell application.

Method 3: Update PowerShell From Microsoft Store

PowerShell 7 can also be installed through the Microsoft Store on supported Windows 11 systems.

  1. Open Start.
  2. Search for Microsoft Store.
  3. Open the Store.
  4. Search for PowerShell.
  5. Select the official PowerShell application.
  6. Click Get, Install, or Update, depending on the current state.
  7. Wait for the installation to finish.

If PowerShell is already installed through the Store, the Store can provide updates when new versions become available.

After the update, launch PowerShell again and check the version using:

$PSVersionTable.PSVersion

The Microsoft Store method is convenient because updates can be handled through the normal Windows application update system.

Method 4: Install the Latest PowerShell Release Manually

You can also install PowerShell using Microsoft’s official installation package.

This method is useful when you want more control over the installation process or need a specific package type.

The general process is:

  1. Download the current PowerShell release package.
  2. Choose the appropriate Windows installer.
  3. Start the installer.
  4. Follow the installation wizard.
  5. Accept the license terms.
  6. Keep the default installation options unless you have a specific reason to change them.
  7. Complete the installation.
  8. Open the newly installed PowerShell.

PowerShell 7 normally uses the command:

pwsh

Windows PowerShell 5.1 continues to use:

powershell

This distinction makes it easy to determine which PowerShell environment you are using.

Method 5: Install PowerShell 7 Alongside Windows PowerShell 5.1

You do not necessarily need to remove Windows PowerShell 5.1 before installing PowerShell 7.

Windows 11 includes Windows PowerShell 5.1 for compatibility with existing Windows components and scripts.

PowerShell 7 can be installed separately.

After installing it, open Start and search for:

PowerShell 7

You can also launch it from Windows Terminal.

To confirm that PowerShell 7 is running, enter:

$PSVersionTable.PSVersion

If the major version is 7, you are using PowerShell 7.

This side-by-side setup is useful if you have older scripts that specifically require Windows PowerShell 5.1 while newer scripts use PowerShell 7.

Method 6: Update PowerShell Through Windows Terminal

Windows Terminal can make it easier to manage different command-line environments on Windows 11.

To install or update PowerShell:

  1. Open Windows Terminal.
  2. Select a PowerShell profile.
  3. Run:
winget upgrade --id Microsoft.PowerShell
  1. Wait for the package manager to complete the update.
  2. Close Windows Terminal.
  3. Open PowerShell again.

If PowerShell is not currently installed as a separate PowerShell 7 package, use:

winget install --id Microsoft.PowerShell

You can then launch the new version from the Start menu or Windows Terminal.

Method 7: Update PowerShell Modules Separately

Updating PowerShell itself is different from updating PowerShell modules.

Modules provide additional commands and functionality for PowerShell. Some modules may have their own update process.

To see installed modules, run:

Get-InstalledModule

To update a particular module, use:

Update-Module -Name ModuleName

Replace ModuleName with the actual module name.

For example:

Update-Module -Name PowerShellGet

Not every module is installed from the PowerShell Gallery, and some modules are managed by Windows or other software.

Therefore, do not assume that updating all modules is necessary simply because you updated PowerShell.

Method 8: Verify the PowerShell Update

After installing the latest version, verify that the update was successful.

Open the newly installed PowerShell and run:

$PSVersionTable.PSVersion

You can also use:

$PSVersionTable

Check the Major, Minor, and Patch values.

You can identify PowerShell 7 by the major version number beginning with 7.

If the command still reports version 5.1, you may have opened Windows PowerShell rather than the newly installed PowerShell 7.

Try opening PowerShell 7 from the Start menu or run:

pwsh

from Windows Terminal.

PowerShell 5.1 vs PowerShell 7

Windows PowerShell 5.1 and PowerShell 7 are different versions.

Windows PowerShell 5.1 is integrated into Windows and is based on the older .NET Framework. PowerShell 7 is Microsoft’s newer cross-platform PowerShell implementation.

PowerShell 7 provides newer capabilities and is actively developed separately from Windows PowerShell 5.1.

However, some older scripts and Windows-specific modules may have been designed specifically for Windows PowerShell 5.1.

For that reason, installing PowerShell 7 does not mean that you should immediately remove or stop using Windows PowerShell 5.1.

If a script specifically requires Windows PowerShell, run it with the appropriate version.

How to Make PowerShell 7 Your Default Terminal Profile

After installing PowerShell 7, you can choose it as your preferred profile in Windows Terminal.

  1. Open Windows Terminal.
  2. Open the Terminal settings.
  3. Find the Startup section.
  4. Locate the Default profile option.
  5. Select PowerShell or PowerShell 7, depending on how it is listed.
  6. Save the settings.

The next time you open Windows Terminal, it can start directly in your selected PowerShell environment.

This does not remove Windows PowerShell 5.1. It simply changes which shell Windows Terminal opens by default.

What to Do If PowerShell Does Not Update

If winget upgrade does not update PowerShell, first check whether PowerShell 7 is already installed.

Run:

winget list --id Microsoft.PowerShell

If no package is listed, install it with:

winget install --id Microsoft.PowerShell

You can also check your installed PowerShell applications through Settings > Apps > Installed apps.

If you installed PowerShell through the Microsoft Store, check the Store for pending updates.

If an update appears to have completed but the version remains unchanged, close all PowerShell windows and launch the newly installed version again.

Should You Remove Windows PowerShell 5.1?

In most cases, there is no need to remove Windows PowerShell 5.1 simply because you installed PowerShell 7.

Windows PowerShell 5.1 is part of the Windows operating system and is still used by some Windows administration tools and older scripts.

PowerShell 7 is intended to coexist with it.

Keeping both versions allows you to choose the appropriate environment for different tasks.

If a tutorial specifically says to open Windows PowerShell, do not automatically substitute PowerShell 7. Some commands and modules can behave differently between the two versions.

Conclusion

Updating PowerShell in Windows 11 is relatively simple, especially when using Windows Package Manager. You can check your current version with $PSVersionTable, install or update PowerShell 7 with winget, use the Microsoft Store, or perform a manual installation.

It is important to understand that Windows PowerShell 5.1 and PowerShell 7 are separate applications. Installing PowerShell 7 does not normally replace Windows PowerShell 5.1, and keeping both versions can be useful for compatibility.

For most users who want the modern PowerShell experience, installing the current PowerShell 7 release is the practical approach. After updating, always verify the version so you know which PowerShell environment you are actually running.

If you use Windows Terminal frequently, you can also set PowerShell 7 as the default profile. This makes it easier to access the newer shell without manually selecting it each time.

FAQs

1. How do I update PowerShell in Windows 11?

Open Windows Terminal or PowerShell and run winget upgrade --id Microsoft.PowerShell. If PowerShell 7 is not installed, use winget install --id Microsoft.PowerShell.

2. Is PowerShell 7 the same as Windows PowerShell 5.1?

No. Windows PowerShell 5.1 is the older version included with Windows, while PowerShell 7 is the newer PowerShell release. They can coexist on the same Windows 11 computer.

3. How can I check my PowerShell version?

Run $PSVersionTable.PSVersion in PowerShell. The resulting major version tells you which PowerShell generation you are using.

4. Should I uninstall Windows PowerShell 5.1 after installing PowerShell 7?

No. There is generally no need to remove Windows PowerShell 5.1. Some older Windows scripts and administration tools may still require it.

Quick Summary

  • Check your version with $PSVersionTable.PSVersion.
  • Use winget upgrade --id Microsoft.PowerShell to update PowerShell 7.
  • PowerShell 7 can coexist with Windows PowerShell 5.1.
  • Set PowerShell 7 as the default Windows Terminal profile if you use it regularly.

Related Articles

Popular Categories