How to find the PowerShell version in Server Core and Desktop experience
Finding the PowerShell version is important if you are a system administrator for a network consisting of Windows Servers, Windows based workstations or client computers. Finding the PowerShell version can help you to find which features or cmdlets are supported in the PowerShell version your computers are running.
Note that there are two different base PowerShell versions available. First version I want to mention here is "Windows PowerShell". "Windows PowerShell" is the version of PowerShell, which is shipped with Windows Server Operating Systems. The version of "Windows PowerShell" packed with Windows Server 2025 installation media is 5.1.
PowerShell 7.x is the platform independent version, supported on Windows, Linux and Mac Operating Systems. May be because of being actively developed for different Operating Systems, 7.x version is not included by default, with the Windows Server installation media. You may download and install PowerShell 7.x version from the Microsoft website. Please visit the following Microsoft webpage link to find more information about how to install the latest version of PowerShell.
If you have many Windows based computers/servers in your network environment, it is always better to find the version of the PowerShell running in each Windows computer, because if any feature in your PowerShell script is not supported by the PowerShell version in any machine, there is chance for your PowerShell script to fail in that computer.
Finding "Windows PowerShell" version using "$PSVersionTable"
Finding the PowerShell version using "$PSVersionTable" is useful in Windows Server Core installations, because there are no GUI tools in Server Core installations.
Step 01 – To find the PowerShell version of the "Windows PowerShell", open the Windows PowerShell terminal. You can open the "Windows PowerShell" terminal by typing "powershell.exe" at Windows search box and then by clicking the Windows PowerShell from the search results.
Step 02 – Type $PSVersionTable in Windows PowerShell and press "Enter" key to view the Windows PowerShell version. Please refer the below screenshot.
As you can see from the above image, PSVersion (the first line in the $PSVersionTable) shows the version of the Windows PowerShell shipped with the current Windows Server installation media. In this case, the PSVersion is 5.1.26212.5000.
Finding "Windows PowerShell" version from the Windows Registry
Warning – Please be careful. If you do not know what is Windows Registry and how critical & important is the Windows Registry, do not try to open Windows Registry. A mistake while editing the Windows Registry can seriously damage your Windows Server installation or your whole network.
Finding PowerShell version using Windows Registry is useful in Windows Server with Desktop experience.
Step 01 – Type "regedit.exe" in your Windows Search box, and then click "regedit.exe" from the search results. Please refer below screenshot.
Step 02 – The Windows Registry editor application will be opened. In Windows Registry editor, expand Computer > HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft, as shown in below screenshot.
Step 03 – Scroll down to PowerShell and then to PowerShellEngine. Inside PowerShellEngine, you can view the "PowerShellVersion" registry entry. You can view that in this case, the "PowerShellVersion" is 5.1.26212.5000.
Written by Jajish Thomas.
Last updated on 2nd June, 2024.