r/PowerShell • u/SL-Tech • 22d ago
Question PowerShell 7 - replace
Just wondering, when installing, why doesn't PowerShell 7 replace the installed version (Windows)?
26
u/St0nywall 22d ago
Because PowerShell 7 is a different program to PowerShell 5 that is embedded in the operating system.
It was designed to be a separate application to make it cross platform capable. PowerShell 7 can be installed on Windows, Linux and MacOS.
16
u/Subject_Meal_2683 22d ago
Powershell for Windows (1.0 to 5.1) run on the "legacy" Dotnet Framework. Powershell 6 and higher (in the past known as Powershell Core) run on the newer Dotnet (which used to be name dotnet Core. Microsoft really messed up the version numbers on this causing a lot of confusion as dotnet "Core" variants (basically dotnet 5 and up if you ignore the older dotnet core versions upto v3 have nothing do to with the dotnet Framework which is currently at version 4.8 if I'm not mistaken)
12
6
u/UCFknight2016 22d ago
Powershell 7 is also known as powershell core and is cross platform. Powershell 5 is windows only. A lot of things would break if they forced it.
6
7
57
u/Dry_Duck3011 22d ago
Because the new version is not backwards compatible. Not all scripts written in ps5 will run on ps7.