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