Check your PowerShell version in three quick ways

The fastest way to find your PowerShell version is to open PowerShell and run a single command. You have three options depending on what information you need: $PSVersionTable shows everything, $PSVersionTable.PSVersion shows just the version number, or $host.Version shows what your host application reports. Each command takes seconds and works on Windows, macOS, and Linux.

Knowing your version matters because scripts and modules sometimes require a specific PowerShell version to run. Older scripts written for PowerShell 5.1 may not work on PowerShell 7, and newer features added in recent versions won't run on older installations. Checking your version before troubleshooting a broken script saves you time chasing the wrong problem.

Key Takeaways

  • Run $PSVersionTable in PowerShell to see your full version details including the major and minor version numbers.
  • PowerShell 7 and later are cross-platform and run on Windows, macOS, and Linux, while PowerShell 5.1 runs only on Windows.
  • Your version number appears as Major.Minor.Patch — for example, 7.4.1 means version 7, update 4, patch 1.
  • Different versions have different built-in commands and features, so checking your version first helps you know what's available to you.
  • You can have multiple PowerShell versions installed on the same computer without conflict.

The $PSVersionTable command shows everything at once

Open PowerShell and type $PSVersionTable, then press Enter. You'll see a table with several rows. The first row, PSVersion, is what you're looking for — it shows your version as Major.Minor.Patch. For example, 7.4.1 means PowerShell 7, the fourth minor update, with the first patch applied.

The table also shows PSEdition, which tells you whether you're running Desktop (Windows only, versions 5.1 and earlier) or Core (cross-platform, versions 6.0 and later). The OS row shows your operating system, and Platform shows whether it's Win32NT, Unix, or Darwin. This full view is useful when you're troubleshooting or checking whether your system meets a script's requirements.

Use $PSVersionTable.PSVersion for just the version number

If you only need the version number without the extra information, type $PSVersionTable.PSVersion and press Enter. PowerShell returns a single line showing just the version — for instance, 7.4.1. This is faster to read when you already know what you're looking for and don't need the full table.

You can also break this down further: $PSVersionTable.PSVersion.Major returns only the major version number (7), and $PSVersionTable.PSVersion.Minor returns only the minor version (4). This is useful in scripts where you need to check whether the version meets a minimum requirement before running the rest of your code.

The $host.Version command shows what your host reports

Type $host.Version and press Enter. This returns the version that your PowerShell host application reports, which is usually the same as $PSVersionTable.PSVersion but occasionally differs. The host is the application running PowerShell — for example, the Windows Terminal, the ISE (Integrated Scripting Environment), or Visual Studio Code with the PowerShell extension.

In most cases, $host.Version and $PSVersionTable.PSVersion match. If they don't, it usually means your host application is older than your PowerShell engine. This rarely causes problems, but it's worth knowing if you're debugging something unusual.

Understand version numbering: Major, Minor, and Patch

PowerShell versions follow a three-part numbering system. The Major version (the first number) changes when there are significant changes to the language or features — PowerShell 5 to PowerShell 6 was a major jump because version 6 became cross-platform. The Minor version (the second number) increments when new features are added but the version is still backward compatible. The Patch version (the third number) increases for bug fixes and security updates.

For example, PowerShell 7.4.1 means you're on major version 7, minor version 4 (which added several new features), with patch 1 applied (which fixed bugs found in patch 0). When someone says "you need PowerShell 7 or later," they mean major version 7 or higher. When they say "you need 7.4 or later," they mean at least minor version 4 within major version 7.

PowerShell 5.1 versus PowerShell 7 and later: what's different

PowerShell 5.1 is the last version that runs only on Windows and comes built into Windows 10 and Windows 11. It's stable and widely used, but it's no longer receiving new features — only security updates. PowerShell 7 and later are cross-platform, meaning they run on Windows, macOS, and Linux. Microsoft now focuses development on PowerShell 7 and newer versions.

If your script requires PowerShell 7 features but you're running 5.1, the script will fail with an error about an unknown command or parameter. Conversely, if you're on PowerShell 7 and run a script written for 5.1, it usually works fine because newer versions maintain backward compatibility. You can have both versions installed on the same computer without conflict — they run independently.

Check your version before running a script or installing a module

Before you run a script someone gave you or install a PowerShell module from the PowerShell Gallery, check whether it lists a minimum version requirement. Look in the script's comments at the top or in the module's documentation. If it says "requires PowerShell 7.0 or later" and you're running 5.1, the script won't work until you upgrade.

You can also check a module's requirements before installing it. In the PowerShell Gallery website, each module lists its minimum PowerShell version. If you try to install a module that requires a newer version than you have, PowerShell will warn you during installation. Checking your version first saves you the frustration of installing something that won't run.

Frequently Asked Questions

How do I update PowerShell to a newer version?

PowerShell 5.1 updates come through Windows Update on Windows 10 and 11. For PowerShell 7 and later, download the installer from the official PowerShell GitHub releases page or use your system's package manager (Homebrew on macOS, apt or yum on Linux). Both versions can coexist on the same computer.

What if I see two different version numbers when I check?

If $PSVersionTable.PSVersion and $host.Version differ, your host application is older than your PowerShell engine. This is usually harmless. Update your host application (Windows Terminal, VS Code, or ISE) to match your PowerShell version if you want them aligned, but it's not required for most work.

Can I run PowerShell 7 on Windows 7 or Windows 8?

No. PowerShell 7 requires Windows 10 or later, macOS 10.13 or later, or a supported Linux distribution. Windows 7 and 8 can only run PowerShell 5.1. If you need PowerShell 7 features on an older Windows version, you'll need to upgrade your operating system.

Why does my script say it needs PowerShell 7 when I already have it installed?

You might have PowerShell 5.1 open instead of PowerShell 7. On Windows, both versions can be installed. PowerShell 7 is usually launched as "pwsh" or "PowerShell 7" from the Start menu, while 5.1 is just "PowerShell." Check your version with $PSVersionTable to confirm which one you're running.

Is there a way to check the version without opening PowerShell?

On Windows, you can right-click PowerShell in the Start menu and select "Properties" to see the version in the details, though this is less reliable than running a command. The command-line approach is always more accurate because it shows what's actually running, not what the system thinks is installed.