Windows PowerShell gets better all the time and Microsoft offers a major new release about every three years. Here are all of the things you need to know about the version of PowerShell.

Command To Show Current Version of PowerShell

windows powershell at work - man in front of screens

You can use the following command in PowerShell to display the current version:

$PSVersionTable.PSVersion

This command will return an object that includes the major, minor, build, and revision numbers of the PowerShell engine. For example, if you’re running PowerShell 5.1, the output will look something like this:

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      14393  2828
This indicates that the major version is 5, the minor version is 1, the build number is 14393, and the revision number is 2828.

What Version of PowerShell Can Windows Be Upgraded To

Operating SystemShipped PowerShell VersionHighest Upgradable Version
Windows 7PowerShell 2.0PowerShell 5.11
Windows 8PowerShell 3.0PowerShell 5.12
Windows 8.1PowerShell 4.0PowerShell 5.13
Windows 10PowerShell 5.0PowerShell 7.4.14
Windows 11PowerShell 5.1PowerShell 7.4.14
Windows 11 23H2PowerShell 5.1.22PowerShell 7.4.14
Server 2008 R2PowerShell 2.0PowerShell 5.13
Server 2012PowerShell 3.0PowerShell 5.12
Server 2012 R2PowerShell 4.0PowerShell 5.13
Server 2016PowerShell 5.1TBD – At Least PowerShell 7.4.14
Server 2019PowerShell 5.1TBD – At Least PowerShell 7.4.14
Server 2022PowerShell 7.0TBD – At Least PowerShell 7.4.14
Server 2025PowerShell 7.4TBD – At Least PowerShell 8

Command To Upgrade PowerShell Versions

To search for the latest version of PowerShell:

winget search Microsoft.PowerShell

To install the latest stable version of PowerShell:

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

To install the latest preview version of PowerShell:

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

Most Important New Features In Each Version of PowerShell

Here are the two most notable new features in each new major version of PowerShell:

  • PowerShell 2.0:
    1. Remoting: This feature allows you to run commands on one or more remote computers from a single computer that is also running Windows PowerShell.
    2. New Cmdlets: PowerShell 2.0 introduces over 100 built-in cmdlets.
  • PowerShell 3.0:
    1. Workflow: This feature allows long-running tasks to be managed as single tasks.
    2. Show-Command: A cmdlet that provides a graphical user interface for cmdlets.
  • PowerShell 4.0:
    1. Desired State Configuration (DSC): This feature allows you to declare and manage the configuration of your systems.
    2. Windows PowerShell Web Access: This feature allows you to run PowerShell commands and scripts in a web-based console.
  • PowerShell 5.0:
    1. Classes: This feature allows you to define classes in your scripts.
    2. PowerShellGet: This module allows you to download and install modules from the PowerShell Gallery.
  • PowerShell 5.1:
    1. Local Users and Groups Cmdlets: These cmdlets allow you to manage local users and groups.
    2. Get-ComputerInfo Cmdlet: This cmdlet allows you to get a consolidated object of system and operating system properties.
  • PowerShell 6.0:
    1. Cross-Platform Support: PowerShell 6.0 is a new edition of PowerShell that is cross-platform (Windows, macOS, and Linux), open-source, and built for heterogeneous environments and the hybrid cloud.
    2. SSH-Based Remoting: This feature allows you to establish remote sessions between different operating systems.
  • PowerShell 7.0:
    1. Pipeline Parallelization: This feature allows you to execute or handle objects in parallel instead of the sequence method when using ForEach-Object -Parallel.
    2. New Operators: PowerShell 7.0 introduces several new operators including ternary operator, pipeline chain operators, and null coalescing operators.
  • PowerShell 7.1:
    1. Built on .NET Core 5.0: PowerShell 7.1 is built on .NET Core 5.0, which includes several core module updates.
    2. PSReadLine 2.1.0: This version includes predictive IntelliSense, which is a fish shell-like syntax prediction engine.
  • PowerShell 7.4:


0 Comments

Leave a Reply

Avatar placeholder

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