In this article, I will guide you on how to find the version of PowerShell that is installed on your system. As a technical enthusiast and PowerShell user myself, I understand the importance of knowing the version you are working with.
PowerShell is a powerful command-line tool developed by Microsoft, designed to automate and manage tasks on Windows operating systems. Different versions of PowerShell may have different features and capabilities, so it’s crucial to know which version you have to ensure compatibility and take advantage of the latest enhancements.
To find the version of PowerShell installed on your system, you can follow these steps:
Method 1: Using the PowerShell Console
The easiest way to check the PowerShell version is by using the PowerShell console itself. Simply open the console by searching for “PowerShell” in the Start menu or by pressing Windows Key + X
and selecting “Windows PowerShell” or “Windows PowerShell (Admin)”.
Once the PowerShell console is open, type the following command and press Enter:
$PSVersionTable.PSVersion
This command will display the version of PowerShell installed on your system, along with other information such as the CLRVersion and BuildVersion.
For example, the output might look like this:
Major Minor Build Revision
----- ----- ----- --------
7 1 2 -1
In this example, the version of PowerShell installed is 7.1.2.
Method 2: Using the Get-Host Cmdlet
Another way to find the PowerShell version is by using the Get-Host cmdlet, which retrieves information about the hosting environment of PowerShell.
To use this method, open the PowerShell console and type the following command:
Get-Host | Select-Object Version
This command will display the version of PowerShell installed on your system.
For example, the output might look like this:
Version
-------
7.1.2
Once again, in this example, the version of PowerShell installed is 7.1.2.
Method 3: Checking the Registry
If you prefer to check the PowerShell version using the Windows Registry, you can do so by following these steps:
- Press
Windows Key + R
to open the Run dialog. - Type “
regedit
” and press Enter to open the Registry Editor. - Navigate to the following path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine
In the right pane, look for the “PowerShellVersion” value. The value data will indicate the version of PowerShell installed on your system.
For example, if the value data is “7.1.2”, it means that the version of PowerShell installed is 7.1.2.
Conclusion
In this article, I’ve shown you three methods to find the version of PowerShell installed on your system. Whether you prefer using the PowerShell console, the Get-Host cmdlet, or checking the Windows Registry, you now have the knowledge to determine the version you are working with.
Knowing your PowerShell version is essential for troubleshooting, ensuring compatibility with scripts and modules, and taking advantage of the latest features and enhancements. So go ahead, find your PowerShell version, and power up your automation and management tasks!