Depending on what version of Windows you are using, the PowerShell version will differ. Depending on the PowerShell version, there might be features that are unavailable and the PowerShell scripts might not work as they should. This is especially true if the scripts are made with specific PowerShell version in mind. So, before doing anything with PowerShell, you might want to check the PowerShell version. Here's how.
Note: though I'm showing this in Windows 10, the below commands/methods work perfectly fine on older versions like Windows 7 and Windows 8.
Check PowerShell Version
To find which version of PowerShell you have in your system, we are going to use the PowerShell itself.
1. You don't need to have administrative privileges to find the PowerShell version. So, search for PowerShell in the start menu and open it. You can also press Win + X and select the "Windows PowerShell" option to open the PowerShell.
2. In the PowerShell window, execute the below command and you will see the PowerShell version next to PSVersion. In my case, the PowerShell version is 5.1.17763.316. You can know what these PowerShell versions actually mean from below, see PowerShell versions heading.
3. If you want to, there is an alternative command to check the PowerShell version number. Just like before, open the PowerShell window and execute the below command. The good thing about this command is that it just shows the PowerShell version eliminating all other fluff like build version, PSCompatibleVersion, etc.
Get-Host | Select-Object Version
As I said before, depending on what version of Windows 10 you are using, the PowerShell version will differ. For instance, the 17763 part of the version number is related to the Windows 10 v1809 build number.
That is all. It is that simple to check PowerShell version in Windows 10. Comment below if need any help.
PowerShell v1.0 - Version 1.0 is released way back in the Windows XP Sevice Pack 2 and server 2003 era as an optional component.
PowerShell v2.0 - With version 2, Microsoft integrated PowerShell in Windows 7 and server 2008 R2.
PowerShell v3.0 - Version 3 made its way to Windows 8 and server 2012. Even Windows 7 and server 2008 R2 got the PowerShell version 3 update.
PowerShell v4.0 - Version 4 is integrated into Windows 8.1. Windows 7 and server 2008 got updated with new PowerShell version too.
PowerShell v5.0 - Version 5 includes major new features like OneGet and extended support for switch management.
PowerShell v5.1 - Version 5.1 was released along with Windows 10 anniversary update and server 2016. From this version onward, PowerShell comes in two variants, regular PowerShell and PowerShell Core. The Core variant of PowerShell runs on the .NET core. PowerShell Core is also bundled in server 2016 Nano.