How to Check Your Windows PowerShell Version
Knowing which version of PowerShell is running on your machine matters more than most people realize. Scripts written for PowerShell 7 may behave differently — or fail entirely — on PowerShell 5.1. System administrators, developers, and everyday users troubleshooting automation issues all eventually need to answer the same question: what version am I actually running?
The answer is straightforward to find, but the setup behind it is worth understanding first.
Why PowerShell Versioning Is More Complicated Than It Looks
Windows ships with Windows PowerShell (versions up to 5.1) built into the operating system. This is the classic blue-window version that's been a part of Windows since Vista. It's still present on every modern Windows 10 and Windows 11 machine.
PowerShell 7 (also called PowerShell Core, though Microsoft dropped that branding) is a completely separate application built on .NET Core. It doesn't replace Windows PowerShell — it installs alongside it. That means you can have both on the same machine, running independently.
This distinction matters because checking the version inside a PowerShell window only tells you the version of that specific instance. If you open the wrong one, you'll get the wrong answer for your use case.
The Fastest Way to Check: $PSVersionTable
Open any PowerShell window and type:
$PSVersionTable Press Enter. You'll see a table of information. The line you're looking for is PSVersion.
A typical Windows PowerShell 5.1 result looks like:
PSVersion 5.1.22621.4391 PSEdition Desktop A PowerShell 7.x result looks like:
PSVersion 7.4.2 PSEdition Core The PSEdition field is your quick confirmation — Desktop means Windows PowerShell, Core means PowerShell 7+.
Checking the Version Without Opening PowerShell
If you need to check from outside a PowerShell session — say, from Command Prompt or a script — you can query the registry or use a command-line call.
From Command Prompt:
powershell -Command "$PSVersionTable.PSVersion" This launches PowerShell briefly, prints the version, and exits. It will reflect whichever powershell.exe is in your system PATH — typically Windows PowerShell 5.1.
To check PowerShell 7 specifically from CMD, you'd use pwsh instead of powershell:
pwsh -Command "$PSVersionTable.PSVersion" If pwsh isn't recognized, PowerShell 7 either isn't installed or isn't in your PATH.
Checking via Windows Settings and Registry 🔍
For Windows PowerShell 5.1, the version is also stored in the Windows Registry at:
HKEY_LOCAL_MACHINESOFTWAREMicrosoftPowerShell3PowerShellEngine Look for the PowerShellVersion key. This approach is useful in environments where you need to query the version without executing PowerShell directly — such as in remote management scenarios or during system audits.
What the Version Numbers Actually Mean
| Version | Edition | Engine | Ships With |
|---|---|---|---|
| 1.0 – 2.0 | Desktop | .NET Framework | Older Windows versions |
| 3.0 – 5.1 | Desktop | .NET Framework | Windows 8.1 / 10 / 11 |
| 6.x | Core | .NET Core | Separate install only |
| 7.0+ | Core | .NET 5/6/7/8+ | Separate install only |
PowerShell 5.1 receives only security updates and is considered the maintenance branch. PowerShell 7.x is the active development branch, with new features, cross-platform support, and improved performance for many workloads.
Version 6.x is end-of-life and rarely seen in the wild anymore. If you encounter it, upgrading to 7.x is the standard path forward.
How to Tell Which PowerShell Window You Have Open
The window title gives you a clue, but it's not always reliable — especially if someone renamed shortcuts or pinned a specific executable. The $PSVersionTable command is more trustworthy.
You can also check the executable path:
(Get-Process -Id $PID).Path This returns the full file path of the running PowerShell process. Windows PowerShell lives at C:WindowsSystem32WindowsPowerShellv1.0powershell.exe. PowerShell 7 typically installs to C:Program FilesPowerShell7pwsh.exe.
Variables That Affect What You're Actually Running 🖥️
Several factors shape which version is in play on any given machine:
- Windows edition and update history — Windows PowerShell 5.1 is standard on current Windows 10/11, but older or minimally updated systems may still be on 5.0 or earlier.
- Whether PowerShell 7 was manually installed — it's not automatic. Someone had to install it intentionally via the Microsoft Store, GitHub releases, or winget.
- Group Policy or enterprise configuration — in managed corporate environments, PowerShell execution policies and which version is accessible can be controlled by IT.
- User vs. system-wide installs — PowerShell 7 can be installed per-user or for all users, which affects PATH availability.
- Terminal application in use — Windows Terminal, VS Code's integrated terminal, and the classic PowerShell console can all be configured to launch different versions by default.
Someone running PowerShell on a freshly updated Windows 11 consumer machine is in a meaningfully different situation than a developer who installed PowerShell 7.4 six months ago for cross-platform scripting — even if both systems show a PowerShell window that looks nearly identical.
The version check itself takes seconds. Understanding what to do with that information depends entirely on what you're trying to run, maintain, or troubleshoot on your specific setup.