As the title says: What's the difference between PowerShell 5.1 and PowerShell 7?
- I prefer a peer reviewed answer from superuser to articles from all over the web. I think this is a good answer, but if my ego fools me and it is not then my peers will make sure it is forgotten. Sorry for the noise in that case :-)ndemou– ndemou2021-01-28 20:31:43 +00:00Commented Jan 28, 2021 at 20:31
- I've had to answer my own questions, too, because nobody else could... Thanks for answering your own question!bgmCoder– bgmCoder2024-11-13 17:30:45 +00:00Commented Nov 13, 2024 at 17:30
- My comment from 2021 was the answer to a since deleted comment in the lines of "why ask and answer a question when there are dozens of articles all over the web on the same subject".ndemou– ndemou2024-11-15 07:49:35 +00:00Commented Nov 15, 2024 at 7:49
- Ah, right. I was just sympathizing with you. I am glad you posted this question AND the answer because it helped me solve my problems even after I looked at 20 blogs.bgmCoder– bgmCoder2024-11-15 16:10:19 +00:00Commented Nov 15, 2024 at 16:10
1 Answer
TLDR: PowerShell Core is a multi platform fork of PowerShell Desktop v5. PowerShell Desktop v5 will only receive bug fixes and all future development will happen on Core. Howeve, some features of Desktop PowerShell, still haven't find their way in Core v7. So for these features, you still need PowerShell Desktop v5.1. Microsoft seems committed to close the feature gap between PowerShell Desktop and Core.
Related Microsoft articles:
- Differences between Windows PowerShell 5.1 and PowerShell 7.x
- Migrating from Windows PowerShell 5.1 to PowerShell 7
Long version
PowerShell AKA Windows PowerShell, PowerShell Desktop, PowerShell v1 to v5: It is, and will continue to be a very stable platform that is not going to be significantly modified or gain new features. Microsoft is to only provide bug fixes and security updates to Windows PowerShell.
PowerShell Core AKA PowerShell v6,7,…: It's multi-platform(Linux, Mac, Windows) and it's the product that will get all the new features going forward. So this should be the choice for those who want to have the latest and greatest capabilities. The first version of PowerShell Core (ver5.1 bundled with Windows Server 2016 Nano Server) was a fork of Windows PowerShell 5 that didn’t have all its features. Even in the Windows version of PowerShell Core 6 a lot of cmdlets that were found in v5 are missing. And not only that but there are also entire modules missing. On the other hand a lot of new features & cmdlets & modules first appeared in v6 and v7 and all new features are going to be developed for PowerShell Core only. In the announcement of v7 Microsoft wrote "A big focus of PowerShell 7 is making it a viable replacement for Windows PowerShell 5.1. This means it must have near parity with Windows PowerShell in terms of compatibility with modules that ship with Windows."
[This answer is based on Wikipedia and http://techgenix.com/powershell-core/]
- I came here because my 365 scripts don't work anymore and I can't use powershell core with azuread. So, before I remove Core, I wanted to find out if I was thinking aright.bgmCoder– bgmCoder2024-11-13 17:36:27 +00:00Commented Nov 13, 2024 at 17:36