The PowerShell community is beginning another year in the world of PowerShell 7. Most of you know what that means. However, there are newcomers to our community practically every day. Or I know there are occasional or reluctant users who might not pay enough attention to understand the world of PowerShell as it stands today. I wrote this post as a kind of virtual sticky note for the PowerShell community. Feel free to reference this post in your own work so that you don't have to explain or define "Windows PowerShell" and "PowerShell".
ManageEngine ADManager Plus - Download Free Trial
Exclusive offer on ADManager Plus for US and UK regions. Claim now!
Windows PowerShell
It used to be that when someone mentioned "PowerShell", what they were really referring to was Windows PowerShell. This is the version that was first released in 2006 and updated all the way through version 5.1. I am assuming almost all of you are now running some version of Windows 10 which means you are running the most current, and last, version of Windows PowerShell.
Windows PowerShell is proprietary and as the name implies, only runs on Windows platforms. At this point in time, I think of Windows PowerShell as the legacy version. Other than a possible security update, Windows PowerShell is finished and will no longer be developed. It won't disappear anytime soon and I know many people who still have to use Windows PowerShell.
Whenever I reference Windows PowerShell in my writing, I am referring to Windows PowerShell 5.1 most likely running in Windows 10. If by chance you are running Windows 7/8, I encourage you to upgrade PowerShell to 5.1 if at all possible. See https://docs.microsoft.com//powershell/scripting/windows-powershell/install/installing-windows-powershell?view=powershell-7.1 for more information.
The command to start Windows PowerShell is powershell.exe.
PowerShell
The relatively new kid on the block is PowerShell. Notice the lack of the Windows modifier. This is because this version runs cross-platform, including non-Windows systems like Mac and Ubuntu. This version is a huge and incredibly active open source project on GitHub. Earlier versions were referred to as PowerShell Core and used a 6.x numbering system. These editions should have fallen out of their support windows.
PowerShell 7.x is the new code branch that is under active development. Technically, there was only a minor step from the last 6.x branch to 7.x. But Microsoft wanted to make a clear distinction between past versions and the future. The Core moniker was dropped and going forward it was just going to be PowerShell.
When I mention PowerShell in my work, I am referring to the latest, stable 7.x release. PowerShell will almost always have a preview release as well. Personally, a PowerShell reference means running on a Windows platform. Even though PowerShell is mostly the same across platforms, there are operating system differences. For example, Linux machines don't use the WSMan protocol so there are no WSMan-related cmdlets.
Core concepts and principals remain unchanged between Windows PowerShell and PowerShell. You still have objects in the pipeline, variables, aliases, cmdlets, and common commands like Get-Member and Select-Object.
On Windows platforms you can install and run PowerShell side-by-side with Windows PowerShell. Check out the PowerShell GitHub repository or use my PSReleaseTools module for installation guidance.
The command to start Powershell is pwsh.exe. Non-Windows platforms most likely will use just pwsh.
In the Shell
In both Windows PowerShell and PowerShell, you can look at $PSVersionTable to check version. The $PSEdition variable will display Desktop for Windows PowerShell and Core for PowerShell. These values are also used in modules to declare compatibility. In PowerShell, there are additional variables you can use or check.
There are slight differences with $PSVersionTable in Windows PowerShell.
Summary
The PowerShell world continues to be an exciting and dynamic place. If you are writing, speaking, or teaching about it, I encourage you to be clear about the different versions. Using terms like "Windows PowerShell" and "PowerShell" can only bring clarity. I don't think you need to reference a version number unless you are covering something that was introduced with a specific version.
Eventually, everything will be simple be PowerShell, but that won't be any time soon. In the mean time, clarity is critical.
I hope this helps.
2 thoughts on “What the Shell is Happening?”
Comments are closed.