Windows 7 How to Check PowerShell Version on Windows 7 for Script Compatibility

nikolaymartin

Member
Joined
May 23, 2019
Messages
4
I have Windows 7 machine and i want to run different powershell scripts and commands but they can run specşfşc powerShell versions. How can i find current PowerShell version?
 

Solution
Just type $PSVersionTable.PSVersion

Most scripts should run on version 3.x, 4.x and 5.x in some cases scripts require the old version 2.0 which can be installed alongside a newer version in which case you can run a script with the old version with powershell.exe -Version 2.0 -file C:\path\to\script.ps1
You can run different commands to get version but the most eeliable and straighforward one is $PSVersionTable.PSVersion command.
Reference: How To Determine Installed Powershell Version? – POFTUT
 

Just type $PSVersionTable.PSVersion

Most scripts should run on version 3.x, 4.x and 5.x in some cases scripts require the old version 2.0 which can be installed alongside a newer version in which case you can run a script with the old version with powershell.exe -Version 2.0 -file C:\path\to\script.ps1
 

Solution
Back
Top