Is all modern OS only coming with PowerShell 5.1 by default?

James J 606 Reputation points
2023-01-21T04:30:18.2766667+00:00

To my knowledge all the modern OS coming with PowerShell 5.1 by default. Is there any plan to come Power Shell Core by default instead of PS 5.1 or both Side by side. Can you please share the plan will be helpful and share the list of OS version as well.

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

Accepted answer
  1. M. Jenne 75 Reputation points
    2023-01-21T07:05:23.6+00:00

    The answer is almost certainly "no."

    But that's a good thing. :)

    Windows PowerShell 5.1 should be considered "static." It may get a security update if needed, but otherwise will see the same amount of inovation as you have seen in the CMD.EXE prompt over the past 10 years .... basically none.

    Do batch files written 10+ years ago still run on Windows systems? For the most part yes. The same will be true for your scripts using Windows PowerShell 5.1.

    The fact that Windows PowerShell 5.1 shipped with Windows Server 2022 tells you that it will be around at least until that OS is end of life, currently set in October, 2031.

    Now, here's why you don't want Microsoft to include PowerShell 7.x or new versions in Windows releases

    • things released with a Windows OS need to be supported for a long time, that creates a lot of burden on dev teams. By releasing PowerShell 7.x independent of the OS, the PowerShell team can state their own support lifecycle, and not have to worry about supporting PowerShell versions that are really, really old.
    • Using an OS as a release mechanism slows things down. It slows down the OS release due to integration testing, and it could slow down the development of PowerShell itself if the releases are 2-3 years apart. PowerShell 7.x is on a much faster release cycle that could ever be done if it was bundled with the OS release.

    I manage an environment with about 2500 Windows servers. Every single one has Windows PowerShell 5.1 and PowerShell 7.2 installed. I may have a few with newer versions / preview versions installed, but my base OS toolset includes the most recent LTS release of PowerShell, which is currently 7.2.

    Same thing applies to surrounding technologies like VS Code and Windows Terminal. Everyone is better off keeping those releases independent of Microsoft OS release milestones.

    MJ

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Zarate, Martin 10 Reputation points
    2023-10-03T16:56:37.05+00:00

    There are serious, painful, bone-headed, show-stopper bugs in Powershell 5.1.
    Must be nice to work on a programming language that's standard on every computer, but 99.9% of windows computers don't run the version you're actually maintaining so any bugs you get are somebody else's problem. Sweet gig.

    A lot harder to write software when you've got users.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.