Updating PowerShell Version on Windows | Ranjan.info

This article describes how to update windows powershell Latest version 5.1 and how to install (upgrade) powershell core 7.3. There are currently two branches of PowerShell:

  • the ancient windows powershell (The maximum version is 5.1, which is no longer being developed.);
  • New powershell core Platform (version 7.3 is now available).

Although the PowerShell version numbering continues from 5.1 (6.0, 6.1, 7.0, 7.1, and so on), they are two different platforms. Therefore, updating Windows PowerShell and PowerShell Core will be covered separately.

PowerShell Core 7.x is the version that is most compatible with classic Windows PowerShell. This means you can easily run your old PS1 script files and cmdlets in PowerShell Core.

Upgrading to Windows PowerShell 5.1

Windows PowerShell 5.1 is already installed by default in all editions of Windows 10 and starting with Windows Server 2016.

You must manually upgrade to PowerShell 5.1 for previous versions (Windows 7/8.1 and Windows 2008 R2/2012). For example, Windows Server 2012 R2 (Windows 8.1) has PowerShell 4.0 installed.

Let’s try to upgrade Windows PowerShell version to 5.1 in Windows Server 2012 R2.

First, check the current PowerShell version (screenshot shows it’s PowerShell 4.0):


PSVersionTable.PSVersion check powershell version

To upgrade your PowerShell version to 5.1, install Windows Management Framework 5.1what is needed .NET Framework 4.5.2 (or later). Make sure .NET 4.5.2 or higher is installed using this command:

(Get-ItemProperty ‘HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full’ -Name Release).Release

Get .NET Framework Version on Windows

In my case, release version 378675 This means that the .NET Framework version 4.5.1 is installed. So, I need to download and install the latest .NET Framework 4.8 (here’s the link to the offline installer): , ndp48-x86-x64-allos-enu.exe,

Install the .NET 4.8 package (you will need to restart your computer):

NET Framework 4.8 Installation on Windows Server 2012 R2

If you install WMF 5.1 without .NET 4.5.2, some PowerShell features will not be available.

download WMF 5.1 For Windows Server 2012 R2 — Win8.1AndW2K12R2-KB3191564-x64.msu ,https://go.microsoft.com/fwlink/?linkid=839516,

Install Windows Management Framework 5.1 from MSU file.

Install Windows Management Framework 5.1

After restarting the server, open the powershell.exe console and make sure PowerShell is updated to version 5.1.

Update to Windows PowerShell 5.1

If you don’t have Windows 7 or Windows Server 2008 R2 support, you can upgrade the PowerShell version from 2.0 to 5.1 in the same way. First, install NET Framework 4.5.2 (or new), then WMF 5.1 (The download links will be different from the links for Windows Server 2012 R2).

How to install or update PowerShell Core 7?

PowerShell Core is cross-platform and under active development (unlike Windows PowerShell 5.1). Actually, PowerShell Core is a new platform installed on the operating system alongside the classic Windows PowerShell. This means that you cannot upgrade from PowerShell 5.1 to PowerShell Core 7.3. PowerShell 7.x is installed on your computer separately from Windows PowerShell 5.1 (side-by-side).

PowerShell Core 6.x and 7.x are available at this time. It is recommended that you always install the latest version of PowerShell (currently 7.3) unless you require special compatibility with legacy scripts.

There are several ways to upgrade (install) PowerShell Core Edition on Windows 10 and 11:

  • Use the PowerShell Core MSI installer, which is available for download from GitHub;
  • using the built-in Windows 10/11 package manager WinGet;
  • Using the Microsoft Store.

Next, we’ll look at each of these methods using the example of updating PowerShell Core to 7.3 on Windows 10 22H2.

Upgrading PowerShell Core Using MSI Installation

If you want to install PowerShell Core using MSI package, visit the project page And download the installation package for your OS version. At the time of writing, the latest release of PowerShell is v7.3.3dated 24 February 2023 (for example, PowerShell-7.3.3-win-x64.msi Or PowerShell-7.3.3-win-x86.msi, For production environments only use the Stable or LTS release.

Download Powershell Core MSI Installer from Github

Download the MSI file and install it.

The following installation options are available:

  • Add PowerShell to Path Environment Variables
  • Register the Windows Event Logging Manifest (a separate Event Viewer log is created for PowerShell events. %SystemRoot%\System32\Winevt\Logs\PowerShellCore%4Operational.evtx ,
  • Enable PowerShell Remoting (Enables and configures WinRM for PowerShell Remoting)
  • Add ‘Open Here’ Context Menu to Explorer
  • Add ‘Run with PowerShell 7’ context menu for PowerShell files

Install PowerShell Core on Windows

After this, you can enable automatic updates of PowerShell Core via Windows Update/WSUS (see below).

Enable PowerShell Core Updates via Microsoft Update

To install PowerShell Core from MSI package using SCCM/MDT/Script in quiet mode, you can use command with following parameters:

  • disable_telemetry
  • USE_MU – Use Microsoft Update to receive PSCore updates
  • ENABLE_MU – Allow PowerShell Core to be updated via Windows Update

For example, the command for a silent installation might look like this:


You can upgrade PowerShell directly from the console. To install or upgrade to the latest version of PowerShell Core, run the following command:

iex "& { $(irm } -UseMSI"

This command downloads the PowerShell 7.3 MSI file from GitHub and then starts the installation via the MSI installer.

Upgrade PowerShell Core 7.1 from the Command Line

When the installation is complete, the PowerShell Core (pwsh.exe) window appears. Check the PowerShell version to make sure it’s updated to PoSh 7.3.3.

Updated to PowerShell Core 7.3

Using WinGet Package Manager to Install or Update PowerShell Core

If you have WinGet package manager installed, you can install or update your PowerShell version to the latest command:

winget install --id Microsoft.Powershell --source winget

Or, you can install a specific version of PowerShell Core:

winget install --id=Microsoft.PowerShell -v "7.1.2" -e

If you have Chocolatey package manager installed, use the command (for 5.1):

choco install powershell -y
choco upgrade powershell -y

or for PowerShell 7.x:
choco install pwsh -y
choco install pwsh -y

Note the default directories for different versions of PowerShell:

  • Windows PowerShell 5.1: $env:WINDIR\System32\WindowsPowerShell\v1.0
  • PowerShell Core 6.x: $env:ProgramFiles\PowerShell\6
  • PowerShell Core 7.x: $env:ProgramFiles\PowerShell\7

If PowerShell 6.x was installed on your computer, $env:ProgramFiles\PowerShell\6The directory is automatically removed when you install PowerShell 7.3.

Note that the name of the PowerShell executable file has changed. In PowerShell Core, it is C:\Program Files\PowerShell\7\pwsh.exe, It has its own icon in the Start menu.

  • To run .NET Framework-based Windows PowerShell, powershell.exe command is used
  • To run .NET Core-based PowerShell Core, use pwsh.exe

pwsh.exe - PowerShell core executable

This means that you have both Windows PowerShell 5.1 and PowerShell Core 7.3 installed on your computer.

two powershell versions on windows 10

To find the version and build of PowerShell installed on your device, you can check the version of the pwsh.exe file:

(Get-Command 'C:\Program Files\PowerShell\7\pwsh.exe').Version

get pwsh.exe file version

You can check the version of a file on a remote computer as follows:

Invoke-Command -Computername computer1 -Scriptblock {(Get-Command 'C:\Program Files\PowerShell\7\pwsh.exe').Version}

Windows PowerShell provides a special backward compatibility mode that allows you to run an older version of PowerShell even when a newer version is installed. You can use the following command to run the specific version of the PowerShell example, 4.0):

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Version 4

Install PowerShell Core on Windows 10 and 11 via Microsoft Store

On Windows 10 and 11, you can install or update PowerShell through the Microsoft Store. You can manually find the PowerShell app in the Store or use Add,

You can also use WinGet to install the Store version of PowerShell:

winget search powershell --source msstore
winget install --id 9MZ1SNWT0N5D

The advantage of installing PowerShell Core from the Microsoft Store is that the App Store automatically checks your installed version of PowerShell and automatically installs updates as they become available.

To verify that you have installed the Store version of PowerShell Core, use the command:

Get-AppPackage Microsoft.PowerShell

Microsoft.PowerShell_7.3.3.0_x64__8wekyb3d8bbwe The package is installed in this example.

AppX-Package of Powershell Core from Microsoft Store

However, there are also drawbacks to the fact that such an instance of PowerShell would be running in a sandbox environment.

Install PowerShell on Windows via the Microsoft Store

Installing/Updating PowerShell Core on Remote Computer

To install or update PowerShell Core on multiple remote computers, consider two scenarios.

Deploying PowerShell Core with Group Policy

You can use Group Policy to centrally deploy and update PowerShell Core in an Active Directory domain. Use the GPO’s features to deploy MSI packages to domain computers.

  1. Download the PowerShell MSI installation file and copy it to the SYSVOL directory on the domain controller;
  2. Open the Domain Group Policy Management Console (gpmc.msc), create a new GPO and link it to the OU with Computers and Servers;
  3. Go to GPO section computer configuration , software settingsCreate a new package, and specify the path to the PowerShell MSI installation file in the SYSVOL folder in the domain (use the UNC path); Updating powershell on domain computer using GPO
    To target your policy more precisely to domain devices, you can use GPO WMI filters.
  4. To update the Group Policy settings for the software installation, you must restart the computer. The new version of PowerShell will be installed on all computers upon startup.

How to update PowerShell on remote computer from command prompt?

You can use the command line prompt to update PowerShell on a remote computer.

  • The first method uses the MSI installer on a shared network folder to remotely update PowerShell on a computer:Invoke-Command -ComputerName mun-srv01 -ScriptBlock {Start-Process msiexec.exe -ArgumentList '/package "\\mun-fs01\install\PowerShell-7.3.3-win-x64.msi" /quiet ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1' -Wait}
  • The following script selects all enabled computers running Windows 10 from the Active Directory domain and starts downloading and installing PowerShell Core on each of them:
    $ADComputers = Get-ADComputer -Filter 'operatingsystem -like "*Windows 10*" -and enabled -eq "true"'
    ForEach ($computer in $ADcomputers) {
    Invoke-Command -ComputerName $computer {iex "& { $(irm } -UseMSI -Quiet"}
Take care when using the PowerShell Remoting command when connecting to a remote computer ( Enter-PSSession And Invoke-Command cmdlets). If you need to connect to PowerShell 7 endpoint, you need to use the command:

Enter-PSSession -ComputerName dc01 -ConfigurationName "powershell.7"

Otherwise, you’ll connect to the PowerShell Remoting 5.1 endpoint.

The most common way to update the PowerShell Core on Linux distros is to use the native package manager.

Updating PowerShell via Windows Update or WSUS

Prior to PowerShell Core 7.2, pwsh.exe was not automatically updated. After the release of the new version, there was only one notification in the console:

A new PowerShell stable release is available. Upgrade now, or check out the release page at: 

Console Information: A new PowerShell stable release is available

Starting with version 7.2, PowerShell Core supports automatic updating via Windows Update (Microsoft Update, Windows Update for Business, internal WSUS server, or SCCM). To do this, you need to enable the appropriate options during the installation of the MSI package.

  • The first allows PowerShell to automatically update using any available channel (enables the registry parameter US use = in 1 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShellCore key) UseMU reg key: Enable autoupdate of PowerShell core
  • The second checkbox will allow you to receive updates for all of Microsoft’s software, not just Windows. If this option is disabled, you will not receive PowerShell updates from Microsoft Update, but you can receive them from your WSUS/SCCM (registry parameter) AU= 1 down HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Services\7971F918-A847-4430-9279-4A52D1EFE18D,Registered with AU Registry

check that Get updates for other Microsoft products when you update Windows The option is now enabled under Settings -> Update & security -> Windows Update -> Advanced options.

Enable the option: Receive updates for other Microsoft products through Windows Update

now, when you click check for updates button or run an update scan via the PSWindowsUpdate module, you’ll get updates for PowerShell Core as well.

check for windows powershell update

Leave a Comment