There are several methods to determine the PowerShell version installed on your system. This guide will walk you through these options, so you can select the one that best fits your needs.
1. Using PSVersionTable Variable
The simplest method to find out your PowerShell version is to use the PSVersionTable variable. By accessing this variable in a PowerShell window, the current version will be displayed.
2. Find PowerShell 7 Version
PowerShell 7, the latest version, introduces enhancements over the traditional Windows PowerShell, which is based on PowerShell 5.1.
3. Using get-host Command
The get-host command is another means to identify the PowerShell version from within a PowerShell window. It retrieves information about the program hosting the PowerShell environment.
4. Using $Host Variable
Yet another approach to reveal the PowerShell version is by using the $host variable, which is automatically initialized upon starting a PowerShell session. This method provides the added advantage of displaying the version in terms of major and minor release numbers, as well as the build version. This detail can be particularly useful for troubleshooting issues in PowerShell.
5. Check the PowerShell Version in the Windows Registry
You can also find the PowerShell version by invoking the Windows Registry. Note that the registry path may vary depending on the major version of PowerShell. Both PowerShell 7 and 5.1 have their own respective registry directories. Here are the paths for each, but remember that future versions may have different locations.
Updating PowerShell
PowerShell typically receives updates through the standard Windows update process. As such, to ensure your PowerShell remains current, be vigilant in applying regular Windows updates. Moreover, PowerShell 7 does not come pre-installed with Windows installations and must be manually installed from the official GitHub repository should you wish to utilize it on your system.








