Let's check out the different methods to check PowerShell Version on Windows 11 with clear steps.

posted Originally published at winsides.com 5 min read

How to Check PowerShell Version on Windows 11?

Check PowerShell Version on Windows 11: Windows PowerShell is a command-line shell and scripting language built on top of the .NET Framework. Unlike the Command Prompt, PowerShell allows users to automate tasks, manage system configurations, and control Windows more effectively. The Automation in Windows PowerShell is extensive, supporting scripts, Loops, Functions, and Modules. Microsoft initially introduced it as Monad in its beta phase, which later became Windows PowerShell 1.0 on its 2006 official launch.

Why Should you Check your PowerShell Version on Windows 11?

Different PowerShell Versions support different cmdlets, exhibit scripting capabilities, and provide security updates. For example, Windows 11 is pre-installed with PowerShell 5.1, which is compatible only with Windows. All of its cmdlets, modules, and scripts are designed for the Windows Ecosystem, whereas the latest Windows PowerShell Version 7 and above have cross-platform ability, and it allows users to run PowerShell 7 and above on other operating systems such as Linux and macOS.

Additionally, PowerShell Version 5 receives only legacy security updates, whereas PowerShell 7 receives frequent security patches, performance improvements, and bug fixes. Each version has its own advantages and disadvantages, and in this article, let's discuss them in detail. Let's get started.

Different Methods to Check PowerShell Version on Windows 11

To determine which version of Windows PowerShell you are using, you can either use Windows PowerShell or you can use outside PowerShell methods.

  • Check PowerShell Version using PowerShell Commands

  • Get PowerShell Version outside Windows PowerShell

  • Easily Check Version on PowerShell 7

How to Determine PowerShell Version using PowerShell Commands?

  • In PowerShell, you can use various commands to get the PowerShell Version. The following are the steps.

  • Firstly, let's open Windows PowerShell using the Run Command. We can use the keyboard shortcut Win Key + R.

  • In the Run, execute the following command to open Windows PowerShell. powershell

  • Open PowerShell using the Run Command

  • The Run command will open PowerShell on Windows 11.

In PowerShell, we can use the following commands to determine PowerShell Version on Windows 11.

1 Using $PSVersionTable

  • Execute the command $PSVersionTable in Windows PowerShell.

Note: If you only want to see the PowerShell version, then you can use the following command in the PowerShell $PSVersionTable.PSVersion. This command will precisely provide the determined PowerShell Version and related information. Kindly refer to the following image.

  • With the above command, only the essential information, such as Major Version, Minor Version, Build, and Revision Number, will be displayed.

2 Get PowerShell Version using the Get-Host Command

The Get-Host Command on Windows PowerShell provides information about the Console Host. The information is not related to the detailed PowerShell Version, however, we will get the PowerShell Version here.

  • To get the PowerShell Version using the Get-Host command, please execute it in PowerShell.

  • Execute the Get-Host Command in PowerShell

  • The output will have the following information. Name, Version, InstanceID, UI, CurrentCulture, CurrentUICulture, Private Data, Debugger Enabled, IsRunspacePushed, Runspace. Here, the version determines PowerShell Version.

3 Determine PowerShell Version Directly using $host.version

  • This command provides straightforward output similar to $PSVersionTable.PSVersion.

  • Execute the following command in PowerShell. $host.version

  • The output will contain the following information. Major Build Number, Minor Build Number, Build Version, and Revision Version.

  • I am currently running Windows PowerShell 5.1.26100.6682.

How to Determine PowerShell Version Outside of PowerShell?

Alright, the above methods explain how to check PowerShell Version using Windows PowerShell itself. Here, we can check how to check the Windows PowerShell Version outside of PowerShell, such as the Command Prompt and Registry Editor.

Get PowerShell Version using Command Prompt:

  • Go to the Run and open Command Prompt using the following command. cmd

  • In the Command Prompt, kindly execute the command powershell -Command "$PSVersionTable.PSVersion"

  • Now, the Command Prompt will display the PowerShell Version. In my case, I am on PowerShell 5.1.26100.6682.

How to Check Windows PowerShell Version on Windows 11 using Registry Editor?

  • To open the registry editor on Windows 11, we will use the Run Command.

  • In the Run, execute the command regedit

  • Open Registry Editor using the Run Command

  • The User Account Control will confirm and open Registry Editor.

  • Navigate to the following path in the Registry Editor. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine

  • Once you navigate to the above path, you can find the file "PowerShellVersion". You can view the version next to it.

  • You can also open it to view the PowerShell Version. That's it.

How to check the Version in the latest PowerShell 7?

Windows PowerShell 7 is the modern, cross-platform form of PowerShell. Unlike the legacy PowerShell 5, which is built into Windows 11, we have to install PowerShell 7 separately. There are different methods available to install PowerShell 7 on Windows 11, from the Microsoft Store to Winget, MSI, and more. Here, we will explain how to check the PowerShell 7 version.

Install PowerShell 7 using WinGet on Windows 11

  • Open Command Prompt, and run the following command. winget search powershell

  • Winget will search the Microsoft Community Repository and Microsoft Store and provide the results.

  • From the results, you can locate the official stable build and install it using the following command. At the time of this article, the latest version of PowerShell is 7.5.3.0. It is the stable and official release. Kindly note down its ID. The ID is Microsoft.PowerShell

  • Locate official and stable PowerShell 7 and note down its ID

  • Next, we will install PowerShell 7 using the following command in the Command Prompt. winget install --id Microsoft.PowerShell

  • This command will install PowerShell 7 from the official GitHub repository. The process will take some time to complete. Kindly be patient.

  • Once the package is successfully installed, you can start using Windows PowerShell 7. You can explicitly access it via the Start menu or by using the command pwsh

Note: You can also download and install Windows PowerShell 7 using the MSI installer from the official GitHub Repository.

Determine PowerShell 7 version using pwsh command

  • The following command will work only on the latest PowerShell 7 version.
  • In PowerShell 7, execute the following command. pwsh --version
  • PowerShell will display the version now.

Note: In PowerShell 7, other legacy methods such as Get-Host, PSVersionTable will work flawlessly. Additonally, you can get PowerShell 7 version using the following command as well. pwsh -v

Take Away

Whether you are using Legacy PowerShell 5 or the Modern PowerShell 7, the above article covers different methods and detailed steps to check the PowerShell Version on all variations. We hope you are satisfied with our article on How to Check PowerShell Version on Windows 11, and if you have any queries, kindly let us know in the Comments.

For more interesting articles, stay tuned to Winsides.com. Happy Scripting! Peace out!

If you read this far, tweet to the author to show them you care. Tweet a Thanks

Nice breakdown of PowerShell version checks on Windows 11, really clear for beginners too. It’s interesting how version 7 adds cross-platform flexibility and frequent updates.

More Posts

How to Upgrade to Windows 11: Compatibility, Steps, and Solutions

Michael Larocca - Jul 15

JavaScript: Understanding the Set and Clear Interval Methods

Michael Larocca - Jun 25

Linux vs Windows Which Operating System is Best?

Dewan Codes - Jan 15

The Tale of Zoe: From Doodler to Best-Seller with HydePHP - (part 2)

melasistema - Jan 21

The Tale of Zoe: From Doodler to Best-Seller with HydePHP - (part 1)

melasistema - Jan 21
chevron_left