📎 AI Summary: The thread discusses how to determine the PowerShell version on a Windows 7 machine for executing scripts requiring specific versions. The most reliable method shared is using the command `$PSVersionTable.PSVersion`. Additionally, it's noted that most scripts work on versions 3.x to 5.x, but older 2.0 scripts can still run by specifying the version explicitly when executing PowerShell. Overall, the conversation provides practical guidance for managing PowerShell versions to ensure script compatibility.
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?
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
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