10

On my box, I installed PowerShell 2.0, but the $PSHome varialbe always return the path below:

C:\Windows\System32\WindowsPowerShell\v1.0

So, where is the v2.0 or v3.0 folder?

smwikipedia
  • 61,609
  • 92
  • 309
  • 482
  • https://stackoverflow.com/a/1825807/470749 shows how to determine what version you are running. It's f***** annoying that Microsoft puts `WindowsPowerShell\v1.0` as the folder but then tells me that I'm running 5.1. – Ryan Sep 07 '17 at 23:19

1 Answers1

11

Just like how 64-bit system files in Windows are in System32, all versions of Powershell install into the path that says v1.0. One of the things that MS doesn't seem to learn from. Didn't you wonder that Powershell script files have the extension ps1, psm1 etc?

manojlds
  • 290,304
  • 63
  • 469
  • 417
  • I read somewhere once that it ended up that way because originally it was intended that you could install multiple versions of PowerShell on the same machine and designate script compatibility by file extension, e.g. ps2 would be a v2 script... Apparently that never happened :/ – Andy Arismendi Dec 17 '12 at 07:17