I currently have Windows Management Framework 5.1 installed. I want to check that my script is working correctly with PowerShell 3 and 4. I know about this PowerShell.exe -Version, but when I try:
PowerShell.exe -Version 3
Or:
PowerShell.exe -Version 4
And then run $PSVersionTable, still showing PowerShell 5.1 as the current version.
If I run:
PowerShell.exe -Version 2
Then it $PSVersionTableshows that the console now has version 2. Why is this?
source
share