When I create a shortcut to powershell using the wizard, instead of creating a shortcut to Powershell 4, it leads to 1.0. If I go to the file location of the executable, the only thing there is the executable for 1.0. Where is Powershell 4.0 located?
Asked
Active
Viewed 376 times
1
-
7Executable for PowerShell v1.0, v2.0, v3.0, v4.0, v5.0 and v5.1 is located in the same palace: `C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe`. Actual version depends on installed version and command line parameters. Use `$PSVersionTable` to see actual PowerShell version. – user4003407 Oct 20 '16 at 15:57
-
1Possible duplicate of [Path to PowerShell.exe v2.0](http://stackoverflow.com/questions/4145232/) and [Why is Powershell 2.0 installed in the same location as Powershell 1.0?](http://stackoverflow.com/questions/5415259/why-is-powershell-2-0-installed-in-the-same-location-as-powershell-1-0) – TessellatingHeckler Oct 20 '16 at 17:04
1 Answers
3
That's the correct path. If you want to start a particular version, you can specify the -version parameter when launching powershell.exe such as:
powershell.exe -version 2.0
Without it, powershell will launch the latest installed.

AtomicFireball
- 341
- 2
- 9
-
This appears to only work with version 2, I have 5 installed and when I ran get-host it only showed the correct version for 2.0 – nkasco Oct 20 '16 at 19:05
-
Right. The above command will launch PS as version 2.0. If you want another version, such as 4.0 then replace 2.0 with 4.0, or whatever version you want. If you want to just launch the latest version, just omit the -version parameter altogether. I understand your original question was questioning the v1.0 path of the executable. This is the correct path to all versions of PS. The version parameter is how you can switch which PS version you want to launch. – AtomicFireball Oct 20 '16 at 19:14
-
No, what I am saying is running -version 3.0 only showed 5.0.xx as the version, etc. – nkasco Oct 20 '16 at 19:34
-
Just found this. Apparently it only works for launching as 2.0 now. https://www.sapien.com/blog/2015/12/21/where-are-v3-and-v4-powershell-versions-in-powershell-studio/ – AtomicFireball Oct 20 '16 at 19:44