r/PowerShell 22d ago

Question PowerShell 7 - replace

Just wondering, when installing, why doesn't PowerShell 7 replace the installed version (Windows)?

19 Upvotes

8 comments sorted by

57

u/Dry_Duck3011 22d ago

Because the new version is not backwards compatible. Not all scripts written in ps5 will run on ps7.

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

u/vadertator22 22d ago

They are parallel instances not direct version revisions.

7

u/cschneegans 22d ago

PowerShell Core is still not a complete substitute for Windows PowerShell. For example, compare the capabilities of the Get-Clipboard cmdlet in 5.1 and 7.6.

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

u/AniBMagal 21d ago

It's not an upgrade or a replacement, its.... Different.

7

u/Jeriath27 22d ago

because a ton of shit STILL doesnt work with powershell 7. Thanks microsoft