How to find the Powershell version in Windows
There are many ways to find out which version of PowerShell is installed on a system. This post will go through a couple of the simplest methods.
Quick One-Liner
The fastest way to get your PowerShell version is with $PSVersionTable.PSVersion:
$PSVersionTable.PSVersion
Major Minor Patch PreReleaseLabel BuildLabel
----- ----- ----- --------------- ----------
7 5 0
This works in both Windows PowerShell and PowerShell 7+. If you’re running an older version, you’ll see Build and Revision columns instead of Patch.
For PowerShell v2 and up
For PowerShell v2 and upwards, you can call the $PSVersionTable:
$PSVersionTable
PS C:\> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.19041.906
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.906
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
This will provide information about the version of PowerShell that is running in the current session.
You can use Get-Help to find out more information on each item:
CLRVersion: The version of the common language runtime (CLR)
BuildVersion: The build number of the current version
PSVersion: The Windows PowerShell version number
WSManStackVersion: The version number of the WS-Management stack
PSCompatibleVersions: Versions of Windows PowerShell that are
compatible with the current version
SerializationVersion: The version of the serialization method
PSRemotingProtocolVersion: The version of the Windows PowerShell remote
management protocol
The version number of PowerShell can be found using PSVersion:
$PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
5 1 19041 906
For PowerShell v1.x
For PowerShell v1.x, you will need to access the Host:
$Host
Name : Windows PowerShell ISE Host
Version : 5.1.19041.906
InstanceId : b3a20d9f-d1c9-487e-8023-437573f6d303
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-GB
CurrentUICulture : en-GB
PrivateData : Microsoft.PowerShell.Host.ISE.ISEOptions
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
Similarly, the version can be found by accessing the Version item:
$Host.Version
Major Minor Build Revision
----- ----- ----- --------
5 1 19041 906
PowerShell Version History
Here’s a quick reference for every major PowerShell release:
| Version | Name | Release Date |
|---|---|---|
| 1.0 | Windows PowerShell 1.0 | November 2006 |
| 2.0 | Windows PowerShell 2.0 | October 2009 |
| 3.0 | Windows PowerShell 3.0 | September 2012 |
| 4.0 | Windows PowerShell 4.0 | October 2013 |
| 5.0 | Windows PowerShell 5.0 | February 2016 |
| 5.1 | Windows PowerShell 5.1 | January 2017 |
| 6.0 | PowerShell Core 6.0 | January 2018 |
| 6.1 | PowerShell Core 6.1 | September 2018 |
| 6.2 | PowerShell Core 6.2 | March 2019 |
| 7.0 | PowerShell 7.0 | March 2020 |
| 7.1 | PowerShell 7.1 | November 2020 |
| 7.2 | PowerShell 7.2 (LTS) | November 2021 |
| 7.3 | PowerShell 7.3 | November 2022 |
| 7.4 | PowerShell 7.4 (LTS) | November 2023 |
| 7.5 | PowerShell 7.5 | November 2024 |
Windows PowerShell 5.1 is the last version of the “classic” Windows-only PowerShell. From 6.0 onwards, PowerShell became cross-platform and open source.
Windows PowerShell vs PowerShell Core
Windows PowerShell (versions up to 5.1) and PowerShell 7+ are different products that can be installed side by side.
- Windows PowerShell 5.1 ships with Windows 10 and 11. It runs on the .NET Framework and is Windows-only.
- PowerShell 7+ (formerly PowerShell Core) runs on .NET and works on Windows, macOS, and Linux.
To check which one you’re running, look at the PSEdition value:
$PSVersionTable.PSEdition
Core
A result of Desktop means Windows PowerShell. A result of Core means PowerShell 6+ (cross-platform).
On Windows, the two have different executables. powershell.exe launches Windows PowerShell 5.1, while pwsh.exe launches PowerShell 7+.