Wikipedia says that PowerShell 2.0 was distributed with Windows 7; so as I use Windows 7, I'm obviously using that version.
But that raises two questions:
C:\Windows\System32\WindowsPowerShell\v1.0
with that trailing v1.0
when it actually should be v2.0
?.ps1
? Will that extension increment when the version changes?This is simply the result of a choice made by the Powershell team. They decided to keep both the 1.0 directory and the .ps1 extension for V2 of powershell.
The best way to actually check the version of Powershell is to use the expression $PSVersionTable.PSVersion
C:\Users\jaredpar> $PSVersionTable.PSVersion
Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1