how to check powershell version Reading Time: 5 minutes

Have you ever wondered how do you check PowerShell version on your system to make sure scripts will run correctly or modules are supported? It’s a fundamental step for IT managers, cybersecurity professionals, and organizational leaders managing endpoints at scale. Whether you’re working with Windows PowerShell, PowerShell Core, or PowerShell 7+, knowing your version helps you stay secure, compatible, and efficient. In this in-depth article we’ll explore why version checking matters, walk through multiple methods across platforms, provide best practices for enterprises, and offer troubleshooting tips.

Why Checking Your PowerShell Version Matters

Knowing exactly how to check PowerShell version matters because:

  • Compatibility: Some scripts, modules or cmdlets may only work on specific versions.
  • Security: Newer versions contain patches and improvements; running outdated versions can expose risk.
  • Support & Auditing: In enterprise environments you often must document software versions for compliance.
  • Cross-Platform Readiness: With PowerShell now running on Windows, Linux and macOS, version awareness helps standardize workflows.
    For IT managers and cybersecurity teams, checking and tracking PowerShell versions across fleets is an essential part of endpoint hygiene.

Understanding PowerShell Versions and Editions

Before diving into step-by-step methods, it’s useful to understand the landscape of PowerShell versions and editions you might encounter.

Windows PowerShell (Legacy)

  • Comes pre-installed on many Windows systems, up to version 5.1.
  • Tightly integrated with Windows OS and uses the .NET Framework.

PowerShell Core / PowerShell 7+ (Modern)

  • Cross-platform, built on .NET Core / .NET versions, runs on Windows, Linux, macOS.
  • Features newer cmdlets, performance improvements, and active development.

Edition awareness

  • Desktop edition typically means Windows PowerShell (5.x)
  • Core or PowerShell 7+ indicates the modern version
    Identifying which edition you are running is part of correctly answering how do you check PowerShell version.

Primary Method: Using $PSVersionTable in PowerShell

The most reliable and widely-recommended way to check your PowerShell version is via the built-in automatic variable $PSVersionTable.

Steps:

  1. Open PowerShell (or Windows Terminal) in your environment.
  2. At the prompt type: $PSVersionTable.PSVersion and press Enter.
  3. The output will display fields such as Major, Minor, Build, Revision.
  4. If you want full detail, type simply: $PSVersionTable which shows editions, OS, compatible versions and more.
    This method works across Windows, and for PowerShell Core on other OSes as well.

Why this method is preferred

  • It shows the version of the PowerShell engine, not just the host.
  • Works consistently—even on remote systems if run via Invoke-Command.
  • Provides additional fields like PSEdition, helping differentiate between Desktop vs. Core.

Alternative Methods to Check PowerShell Version

When scripting, automating, or working remotely, these alternate approaches can be helpful in addition to using $PSVersionTable.

Method 2: Get-Host Cmdlet

  • Open PowerShell and type: Get-Host
  • Look at the Version property in the output.
    Note: This reports the version of the host application (e.g., ConsoleHost), not necessarily the PowerShell engine. So it may be misleading for version-sensitive tasks.

Method 3: $Host.Version Automatic Variable

  • In PowerShell: $Host.Version
  • Similar limitation as Get-Host — shows host version, not engine version, so it’s less accurate for scripts or remote checks.

Method 4: Registry Query (Windows Only)

For environments where you cannot open a console, you can inspect the registry:

  • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine
  • Look for the PowerShellVersion entry.
  • For PowerShell 7+ (Core), version info may live in HKLM:\SOFTWARE\Microsoft\PowerShellCore\…
    This is more advanced and typically used in auditing or large-scale inventory scenarios.

Method 5: Command Prompt or from Scripts

If you’re in cmd.exe or scripting shell:

powershell -Command "$PSVersionTable.PSVersion"

This executes PowerShell and returns version information. Useful in batch scripts or remote diagnostics.

How to Check PowerShell Version on Remote Systems

For IT managers or security teams overseeing many devices, checking version remotely is common.

Remoting via Invoke-Command:

Invoke-Command -ComputerName Server01 -ScriptBlock { $PSVersionTable.PSVersion } -Credential (Get-Credential)

This returns the version on a remote machine.

Using PowerShell Inventory Scripts

You can scan multiple endpoints:

$computers = Get-Content C:\computers.txt
$results = Invoke-Command -ComputerName $computers -ScriptBlock { $PSVersionTable.PSVersion }
$results | Export-CSV C:\PSVersionReport.csv

This method supports large-scale auditing and compliance checks across networks.

Interpreting Version Results & What They Mean

Once you have version information, it’s important to correctly read and act on it.

Key Fields & What They Tell You

  • Major.Minor.Build.Revision: Full version identifier (e.g., 7.4.2.0)
  • PSEdition: Indicates if it’s Desktop (Windows PowerShell) or Core (PowerShell 7+)
  • OS: May show the operating system context

Sample output explanation

PSVersion Major 7  
        Minor 4  
        Build 2  
        Revision 0  
PSEdition Core  

This indicates you are running PowerShell 7.4.2, the Core edition.

Why version matters for scripts

  • Some modules require PowerShell 7+ (Cross-platform).
  • Legacy scripts might only work on Windows PowerShell 5.1.
  • Compatibility issues can lead to failures—so tracking version is critical for deployment.

Updating PowerShell & Maintaining Version Control

Knowing how to check PowerShell version is only half the story. You must also keep versions current and compatible.

Steps to Update PowerShell

  • On Windows 10/11: Go to Microsoft Store or use winget install --id Microsoft.Powershell for PowerShell 7+.
  • On Linux/macOS: Use the package manager or download from GitHub PowerShell/PowerShell repository.

Version Management Best Practices

  • Standardize a minimum supported version across your organization (for example PowerShell 7.x).
  • Maintain legacy systems but isolate incompatible versions.
  • Use automation to deploy updates and monitor version drift.
    For IT infrastructure and cybersecurity teams, version control supports stability, security, and audit readiness.

Troubleshooting Version Checking Issues

Sometimes you may run into problems when trying to check or interpret the PowerShell version. Here are common issues and solutions.

Issue: Command returns nothing or error

  • Ensure you opened PowerShell with proper permissions (Administrator).
  • If using remote command — verify remoting is enabled (Enable-PSRemoting).

Issue: Version still shows 5.1 despite installing PowerShell 7

  • You may have opened the older “Windows PowerShell” host. Launch “PowerShell” (7.x) explicitly (often listed as “PowerShell (x86)” or similar).
  • Confirm the edition using $PSVersionTable.PSEdition.

Issue: Remote systems show different versions

  • Check whether both Desktop & Core are installed.
  • Use $PSVersionTable.PSEdition to verify edition.
  • Use consistent commands and remoting credentials.

Issue: Scripts fail due to version mismatches

  • Use version check logic at the top of scripts: if ($PSVersionTable.PSVersion.Major -lt 7) { Write-Error "This script requires PowerShell 7 or higher." exit }
  • Or detect edition and route logic accordingly.
    These practices help maintain compatibility and protect against errors in production environments.

Best Practices for IT Managers & Cybersecurity Teams

For organizations managing large fleets or critical systems, tracking PowerShell version is part of good IT governance.

Recommended policies include:

  • Create an inventory of PowerShell version across all devices.
  • Automate version checks and reports weekly.
  • Link version checks to patch management workflows.
  • Educate teams about version differences and migration strategies.
  • Tie version data to compliance frameworks (like ISO 27001, NIST).
    By embedding how to check PowerShell version into your endpoint management strategy, you improve control, compatibility, and security across the organization.

Frequently Asked Questions (FAQ)

Q1: Can I have both Windows PowerShell 5.1 and PowerShell 7+ installed at the same time?
A1: Yes, you can. They operate side by side. Use $PSVersionTable.PSVersion in the version you’re running to determine which one is active.

Q2: Can I check PowerShell version from a remote PC without logging in locally?
A2: Yes. You can use Invoke-Command with a remote host name or IP and retrieve $PSVersionTable.PSVersion remotely.

Q3: My script requires certain modules but fails—could version be the issue?
A3: Absolutely. If the module requires PowerShell 7+ and you’re on 5.1, it may not load or may fail with errors. Checking version is a key first step.

Q4: Does checking the PowerShell version affect system performance or security?
A4: No, version checks are light and immediate. They have negligible impact. The benefit is better compatibility and script reliability.

Q5: How often should I check PowerShell version in an enterprise environment?
A5: As part of routine audits—weekly or monthly. Also review after major OS updates or when deploying new scripts/automation.

Final Thoughts

Knowing how to check PowerShell version is a foundational skill for managing scripting, automation, and system health effectively. Whether you’re working on a single device or overseeing hundreds of endpoints, version awareness ensures compatibility, security, and operational readiness.

By using methods like $PSVersionTable.PSVersion, registry queries, remote checks and version control practices, you position your infrastructure for smoother automation, fewer errors and stronger governance.

Turn version checking into a routine: integrate it into your audits, scripts, or endpoint management dashboards—and ensure that you always run supported, secure, and consistent PowerShell environments.

Start your free trial now and equip your team with Xcitium’s unified endpoint management solution—covering version tracking, scripting compliance, and device visibility across your IT ecosystem.

START FREE TRIAL GET YOUR INSTANT SECURITY SCORECARD FOR FREE