PowerShell is a powerful task automation and configuration management framework from Microsoft, widely used by system administrators, DevOps engineers, and IT professionals.
Since PowerShell has evolved significantly over time, from Windows PowerShell (built on the .NET Framework) to the cross-platform PowerShell Core and now PowerShell 7+, it is important to know which version you are running.
In this guide, we will walk you through everything you need to know about how to check the PowerShell version, why it matters, and how to update it.
What is Windows PowerShell?
Windows PowerShell is a command-line shell and scripting language built on the .NET Framework. It was designed to help automate administrative tasks and manage systems more efficiently. With PowerShell, you can run complex commands, write scripts, and automate repetitive tasks across both local and remote systems.
How has PowerShell evolved over the years?
PowerShell has come a long way since its first release in 2006. Each version introduced new capabilities, making it more powerful and versatile for administrators and developers alike.
PowerShell 1.0 (2006): The first release, introduced with Windows Server 2003 R2, provided administrators with a new command-line shell and scripting language.
PowerShell 2.0 (2009): Added remoting, background jobs, and advanced functions, making automation more practical.
PowerShell 3.0 (2012): Came with Windows 8 and Server 2012; introduced workflow, improved cmdlets, and better integration with Windows Management Framework (WMF).
PowerShell 4.0 (2013): Brought Desired State Configuration (DSC) for infrastructure automation.
PowerShell 5.0/5.1 (2016): Introduced PackageManagement (OneGet), PowerShellGet, classes, and numerous enhancements. Windows PowerShell 5.1 was the last version tied to the Windows-only .NET Framework.
PowerShell Core 6.0 (2018): Rebuilt on .NET Core, making PowerShell cross-platform (Windows, Linux, macOS). However, it had some limitations in Windows compatibility.
PowerShell 7.0 (2020 – present): Unified the best of Windows PowerShell and PowerShell Core. Built on .NET 5+ for cross-platform support, it offers improved performance, parallelism (ForEach-Object -Parallel), and long-term support (LTS) releases.
Why should you know which PowerShell version you are using?
Knowing your PowerShell version is not just a technical detail; it directly impacts how smoothly your scripts and commands will run. Each version comes with different features, improvements, and compatibility levels, which means your workflow can vary depending on what is installed.
Here are the key reasons:
Newer versions of PowerShell include advanced cmdlets, better error handling, and performance improvements. If you are on an older version, you may miss out on these capabilities.
Scripts written for PowerShell 7 might not run in Windows PowerShell 5.1, and vice versa. Knowing your version ensures you can adapt or troubleshoot scripts correctly.
PowerShell 7+ works across Windows, Linux, and macOS, while older Windows PowerShell versions are limited to Windows only.
Microsoft is no longer actively developing Windows PowerShell, but PowerShell 7 receives regular updates, bug fixes, and security patches.
When seeking help online or from IT teams, version info is often the first thing you’ll be asked. Many solutions are version-specific.
Which PowerShell version is supported by which Windows OS?
Here is a table that will give you a quick overview of the different Powershell releases and what versions of PowerShell come pre-installed with your Windows operating system.
PowerShell Version | Release Date | Supported by Default |
PowerShell 1.0 | November 2006 | Windows Server 2003 SP1, Windows XP SP2, and Windows Vista. |
PowerShell 2.0 | October 2009 | Windows Server 2008 R2 and Windows 7 |
PowerShell 3.0 | September 2012 | Windows 8 and Windows Server 2012 |
PowerShell 4.0 | October 2013 | Windows 8.1 and Windows Server 2012 R2 |
PowerShell 5.0 | February 2016 | Windows 10 and Windows Server 2016 |
PowerShell 5.1 | January 2017 | Windows 10 anniversary update and Windows Server 2019 |
Powershell 6.0 | January 2018 | Windows 10, Windows 8.1, Windows 7 with Service Pack 1, Windows Server 2012 R2, Windows Server 2012 and Windows Server 2016. |
PowerShell 7.0 | March 2020 | Cross-platform (Windows, Linux, macOS), not preinstalled but available via download |
How to check your PowerShell version?
First, let’s launch PowerShell, and then look at each of the below commands one by one.
It's straightforward, just look for Windows Powershell using the Search bar and click on the app. A black will window will open up where you can type in your commands.
1. The Get-Host command
You can type in the Get-Host command to find out the version of PowerShell you’re using. This is known to be the primary command in Powershell.
Before we find out what’s the version number, let’s quickly understand what is a host in the Get-Host command. In Powershell, a host is a program hosting the PowerShell engine. So, ideally, the Get-host command returns the version of the host. It’s not the version of PowerShell. That’s why this command is said to be inaccurate. Oftentimes, it happens that the version of Powershell matches the version of these Hosts.
This command also displays information such as the name of the host, current culture, and UI culture.
Another point to note here is that this cmdlet does not work remotely. It always returns version 1.0.0.0. Even on Windows Server 2022
The version mentioned in the below screenshot is 5.1.22621.608
2. The $host.Version command
If you run (Get-Host).Version, you will see that it returns a number similar to the one we got with the Get-Host command.
3. The $PSVersionTable command
This is known to be the most reliable method to identify the PowerShell version running in your system. It's simple just type in $PSVersionTable in your command prompt and press Enter. You’ll see a list of information displayed as shown in the below screenshot. The first on the list will show you the PowerShell version. In this case, it is 5.1
The $PSVersionTable is a read-only automatic variable that returns information specifically about the PowerShell engine version. It also displays the edition—Core or Desktop, defining the edition of PowerShell that is running on your system. You can use this automatic variable on a remote computer as well.
The Most Trusted PSA-RMM Platform for Modern MSPs |
4. The registry
As the name suggests, you can use the Registry Editor to find the version of the PowerShell on your system. There are certain times when this method comes in handy. There are two ways in which you can do that. One is to type in a particular command which uses the ‘Get-ItemProperty’ and the other is to open the Registry Editor app and find the PowerShell version.
Let’s check out the first one. It is quick and easy. Just type in the below-given command.
(Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\ PowerShell\3\PowerShellEngine -Name 'PowerShellVersion').PowerShellVersion
For the next method, you need to open the Registry Editor app. You will then be prompted as to whether you want to allow the editor to make changes to your machine. Click on Yes. Now a Window will appear where you have to search for PowerShell under the Software folder. This is how you can do that.
First, click on software under HKEY-LOCAL-MACHINE, or HKLM folder.
Next, scroll down and search for Microsoft in the list of software vendors.
Click on the Microsoft folder and search for PowerShell.
There’ll be two folders(1 and 3) under PowerShell, click on 3.
Then click on PowerShell Engine.
On the right-hand side, you’ll see a list of information including the PowerShell version number.
How to check your PowerShell version on a remote computer?
You can again use the $PSVersionTable automatic variable to determine the PowerShell version on a remote computer. You need to use the below-given Invoke-Command cmdlet where you can edit the ComputerName with your specific computer name.
Invoke-Command -ComputerName incorp-eu-101 -ScriptBlock {$PSVersionTable.PSVersion}
How to check the PowerShell version on Linux?
PowerShell is not limited to Windows anymore; with PowerShell 6+, it became cross-platform and works on Linux distributions like Ubuntu, Debian, CentOS, Fedora, and more. If you are using PowerShell on Linux, the version-checking methods are almost identical to Windows.
Method 1: Using $PSVersionTable
The most accurate way is to use the $PSVersionTable automatic variable:
$PSVersionTable
Example output:
Name Value
---- -----
PSVersion 7.3.6
PSEdition Core
GitCommitId 7.3.6
OS Linux 5.15.0-84-generic #93-Ubuntu SMP
Platform Unix
Method 2: Using $Host.Version
For a quicker check, you can run:
$Host.Version
This gives you the host version in a structured format:
Major Minor Build Revision
----- ----- ----- --------
7 3 6 0
Method 3: Using pwsh --version
Since PowerShell is installed as a separate application (pwsh) on Linux, you can check its version directly from the Linux shell (outside of PowerShell):
pwsh --version
Example output:
PowerShell 7.3.6
Pro Tip: If you are managing multiple environments, using $PSVersionTable inside PowerShell is the most reliable approach, while pwsh --version is great for quick checks at the system level.
How to check the PowerShell version on macOS?
Just like on Linux, PowerShell 6 and later versions are available on macOS thanks to .NET Core. If you have installed PowerShell on your Mac (via Homebrew, direct download, or pkg installer), you can check the version in a few simple ways.
The most reliable way to check your PowerShell version is inside a PowerShell session using $PSVersionTable, which displays detailed information, including the PSVersion, edition, and platform. You can also use $Host.Version for a quicker host-specific version check.
How can I install the latest version of PowerShell?
There are a few ways in which you can upgrade to the latest version of PowerShell. You need to choose the one that works best with your work scenario.
1. Microsoft Store
The most easiest method to install Tthe latest version of PowerShell (PowerShell 7.3) is to download it from Microsoft Store. Just click on Developer tools and search for PowerShell. And, click on Get in Store app. By downloading PowerShell this way, you don’t have to fret about updates. It’ll be done automatically.
2. Winget
This is known to be the fastest way to install the latest version of PowerShell. But, what is Winget? Winget, also known as the Windows Package Manager, is a command-line tool enables users to discover, install, upgrade, remove, and configure applications on Windows client computers. It is the client interface to the Windows Package Manager service.
You can use the following commands to install PowerShell.
winget search Microsoft.PowerShell
3. Installing the MSI package
You can install PowerShell from Github too. You can either use the following links to download the package directly or get it from the GitHub release page.
Choose the operating system that you want to download it for.
It will take a while to download it. Once it is downloaded, follow the installer instructions and execute it.
Which versions of PowerShell come preinstalled with Windows OS?
Windows has included PowerShell by default since Windows 7 and Windows Server 2008 R2, but the preinstalled version depends on the OS edition and release:
Windows 7 / Windows Server 2008 R2: PowerShell 2.0
Windows 8 / Windows Server 2012: PowerShell 3.0
Windows 8.1 / Windows Server 2012 R2: PowerShell 4.0
Windows 10 / Windows Server 2016: PowerShell 5.0 or 5.1 (most editions shipped with 5.1 after updates)
Windows 11 / Windows Server 2022: PowerShell 5.1
Note: These are the built-in Windows PowerShell versions (tied to the .NET Framework). If you want to use PowerShell 7+, you must install it separately, as it runs side-by-side with Windows PowerShell.
What are the differences between Windows PowerShell and PowerShell Core?
PowerShell has evolved into two main editions: Windows PowerShell and PowerShell Core (6+). While they share the same basic syntax and cmdlets, there are important differences that affect compatibility, platform support, and features.
Feature | Windows PowerShell | PowerShell Core (6/7+) |
Platform | Windows only | Cross-platform (Windows, Linux, macOS) |
Underlying Framework | .NET Framework | .NET Core / .NET 5+ |
Latest Version | 5.1 (no active development) | 7.x (actively developed) |
Module Compatibility | Fully compatible with legacy Windows modules | Some legacy modules may require Windows Compatibility module |
Installation | Preinstalled on Windows | Installs side-by-side; must be downloaded separately |
Performance & Features | Standard Windows cmdlets and scripting | Improved performance, ForEach-Object -Parallel, cross-platform features |
Support | Security updates only | Actively maintained with new features and bug fixes |