How to Find Your PowerShell Version (And Why It Matters)

PowerShell has gone through significant evolution over the years — from its origins as a Windows-only automation tool to a cross-platform powerhouse that runs on macOS and Linux. Knowing which version you're running isn't just a trivia question. It determines which commands are available to you, whether scripts will execute correctly, and how your system interacts with modern tools and APIs.

Why PowerShell Version Matters

Not all PowerShell versions are equal. Windows PowerShell (versions 1.0 through 5.1) is the legacy edition built into Windows and tied directly to the .NET Framework. PowerShell Core (version 6.x) and its successor PowerShell 7.x are the modern, open-source, cross-platform editions built on .NET Core and .NET 5+.

The version gap creates real-world consequences:

  • Certain cmdlets exist only in newer versions
  • Remoting, SSH support, and parallelism features improved significantly in version 7
  • Some older enterprise scripts depend on Windows PowerShell 5.1 and may behave differently or break under PowerShell 7
  • Module compatibility varies — not every module written for 5.1 works cleanly in 7.x

If you're troubleshooting a script, setting up automation, or following a tutorial, the first question is always: what version am I actually running?

The Fastest Way to Check Your PowerShell Version 💻

Open a PowerShell window and run:

$PSVersionTable 

This displays a table of version-related information. The key line is PSVersion — that's your PowerShell version.

Example output:

Name Value ---- ----- PSVersion 7.4.1 PSEdition Core OS Microsoft Windows 10.0.22631 Platform Win32NT 

Two fields here carry particular weight:

  • PSVersion — the exact version number (major.minor.patch)
  • PSEdition — either Core (PowerShell 7+) or Desktop (Windows PowerShell 5.1 and earlier)

If you only want the version number by itself:

$PSVersionTable.PSVersion 

This returns a clean, structured object showing Major, Minor, Build, and Revision numbers separately.

Checking PowerShell Version Without Opening PowerShell

Sometimes you need to check from outside a PowerShell session — from Command Prompt, a script, or a remote admin context.

From Command Prompt:

powershell -command "$PSVersionTable.PSVersion" 

Check which PowerShell executables are installed:

On Windows, you can look in:

  • C:WindowsSystem32WindowsPowerShellv1.0 — this is where powershell.exe (5.1) lives
  • C:Program FilesPowerShell7 — this is where pwsh.exe (PowerShell 7) lives if installed

The executable name itself is a signal. powershell.exe launches Windows PowerShell. pwsh.exe launches PowerShell 7+.

From the Windows Registry:

Windows PowerShell version information is stored at:

HKEY_LOCAL_MACHINESOFTWAREMicrosoftPowerShell3PowerShellEngine 

Look for the PowerShellVersion key. This is useful for inventory scripts or MDM tools that read registry values without launching shells.

If You Have Multiple PowerShell Versions Installed

This is increasingly common, and it's a legitimate source of confusion. Many environments — especially developer machines and enterprise workstations — have both Windows PowerShell 5.1 and PowerShell 7.x installed simultaneously. They coexist without conflicting.

ExecutableVersionEditionLocation
powershell.exe5.1DesktopSystem32
pwsh.exe7.xCoreProgram Files

Running $PSVersionTable in one doesn't tell you anything about the other. If you open the wrong terminal, you'll get the wrong version reading. Check which executable your terminal, IDE, or task scheduler is actually invoking — not just what's installed on the machine.

In VS Code, for example, the integrated terminal can be configured to use either version. The version shown in $PSVersionTable will reflect whichever one VS Code is currently pointing to.

Checking Version on macOS and Linux 🐧

PowerShell 7+ is cross-platform. On macOS or Linux, the command is identical:

$PSVersionTable 

Since Windows PowerShell 5.1 doesn't exist on these platforms, there's no ambiguity — if PowerShell is installed, it's pwsh and it's version 6 or later. The PSEdition will always show Core.

To check if PowerShell is installed at all from a Bash or Zsh shell:

pwsh --version 

This returns a simple version string like PowerShell 7.4.1 without needing to enter a full PowerShell session.

What the Version Number Tells You

PowerShell follows semantic versioning (major.minor.patch):

  • Major version changes (5 → 7) signal significant shifts in architecture or compatibility
  • Minor version changes (7.2 → 7.4) introduce new features and improvements
  • Patch version changes indicate bug fixes and security patches

PowerShell 6.x was a transitional release and is now out of support. PowerShell 7.x is the current supported modern branch. Windows PowerShell 5.1 remains in a maintenance-only state — Microsoft continues to ship security fixes but no new features.

The Variables That Shape What Your Version Means

Knowing your version is only part of the picture. What matters alongside it:

  • Your operating system and build — Windows 10, 11, Server 2019, 2022, and Linux distributions all have different default PowerShell states
  • Whether IT manages your machine — enterprise environments often lock PowerShell versions and execution policies, making self-upgrading impossible without admin rights
  • What you're scripting or automating — some tasks genuinely require 7.x features; others work fine on 5.1 indefinitely
  • The modules you depend on — module compatibility between Desktop and Core editions varies widely and isn't always documented clearly

A developer building cross-platform automation has different version requirements than a sysadmin maintaining a decade-old Windows Server environment. The version check is the same command — what it implies for your next step is entirely context-dependent.