To totally unlock this section you need to Log-in
Login
Wondering what version of powershell do I have? While there isn’t a PowerShell Get-Version command to get powershell version number info, I’ll show you how to find out what version of powershell you have using a few different methods.
Sometimes, when you just can't get a script to work, I’ll wonder, “What version of powershell am I using?”
The shortest and easiest method to find this out is by simply entering $host in the PowerShell window:
Now, if you want to determine powershell version but only want to display powershell version info without all that other stuff you could do so by specifying that particular property and enter $Host.Version:
Notice that we got some extra details about the powershell version info. If you’re only interested in the major you can version, further specify that by typing $Host.Version.Major.
There’s another command to check powershell version, and that is $PSVersionTable:
The same thing will happen as with the previous command.
Specifying $PSVersionTable.PSVersion will give you the same results as $Host.Version, and $PSVersionTable.PSVersion.Major will give you the same results as $Host.Version.Major.
You can also check version of powershell with the Get-Host command: