PowerShell has been a significant component of the Windows operating system for many years now. Although there are no signs that PowerShell is going away, Microsoft has been promoting a PowerShell alternative called PowerShell Core. That being the case, I wanted to take the opportunity to discuss the differences between PowerShell and PowerShell Core.
As I’m sure you know, PowerShell is included with the Windows operating system and is installed by default. In contrast, PowerShell Core has to be downloaded and installed separately. You can download PowerShell Core from GitHub at this link.
Installing PowerShell Core
Installing PowerShell Core is a simple process. As you can see in the figure below, PowerShell core uses a simple installation wizard that is similar to that of most other Windows applications.
If you look at the next screenshot, you can see what PowerShell core looks like. The version of PowerShell that is included with Windows 10 is running in the window on the left, and PowerShell Core is running in the window on the right.
The most obvious difference between the two windows is the background color, but if you look a little more closely at the two windows you will notice some other details. First, both PowerShell and PowerShell Core include copyright notices indicating that they are Microsoft creations. The PowerShell Core GitHub page almost makes it seem as though PowerShell Core is a third-party tool, but it is officially sanctioned by Microsoft.
Another thing that you will probably notice in the screen capture is the version number. The version of PowerShell that comes with Windows is 5.x. PowerShell Core’s version information does not even describe it as “PowerShell Core,” but rather as PowerShell 6.1.3.
Normally when Microsoft gives us a new version of a Windows component, the new version replaces the old version. However, that is not going to be the case for PowerShell. PowerShell Core is more than just the next version of PowerShell. In fact, it has a somewhat different purpose.
PowerShell Core: Multiplatform — with a caveat
Unlike Windows PowerShell, PowerShell Core is multiplatform. The previously mentioned GitHub site includes download options for Windows, MacOS, and Linux. There are even versions of PowerShell Core that are designed to run on Arm processors.
As nice as it may be to have a multiplatform version of PowerShell, it is important to remember that PowerShell was originally designed to be a management tool for Windows. Some of the Windows-related cmdlets aren’t really applicable to other platforms. For example, Windows PowerShell contains a large set of cmdlets for managing Hyper-V, but Hyper-V does not run on Linux or on MacOS. Hence, Hyper-V related cmdlets probably won’t be included in the Linux or MacOS versions of PowerShell Core.
Even in the Windows version of PowerShell Core, however, there are a lot of cmdlets missing (at least for now). If you want to know just how many cmdlets are missing, then enter the following two commands into both PowerShell and PowerShell Core. These commands count the total number of cmdlets that are available.
$M = Get-Command * | Measure $M.Count
If you look at the screenshot below, you can see that PowerShell currently includes 7,678 cmdlets. On the other hand, PowerShell Core includes only 2,589 cmdlets. Keep in mind that this figure is based on the modules that are currently loaded, but both environments were running the same three modules (Microsoft.PowerShell.Management, Microsoft.PowerShell.Utility, and PSReadLine).
Not only are there a lot of cmdlets missing from PowerShell Core, there are entire modules missing. If you want to know how many modules are missing, you can use a technique similar to the one that I showed you a moment ago to find out. Rather than using the Get-Command cmdlet, we can use the Get-Module cmdlet with the -ListAvailable parameter. Here are what the commands look like:
$M = Get-Module -ListAvailable | Measure $M.Count
If you look at the screenshot below, you can see that while PowerShell 5 currently reports having 136 modules, PowerShell 6 only has 57 modules. In other words, PowerShell 5 has twice as many modules as PowerShell 6 does.
If you are curious as to which modules are missing, you can type Get-Module -ListAvailable. Doing so will cause PowerShell (or PowerShell Core) to display the names of the modules that are currently installed.
So why are so many cmdlets and modules missing from PowerShell Core? Well, as you probably know, Windows PowerShell is based on the .NET Framework. PowerShell Core, on the other hand, is based on the .NET Core Runtime instead. Because the .NET Core Runtime is still relatively new, it is not yet as capable as the .NET Framework. Even so, I have absolutely no doubt that PowerShell Core will eventually include all of the modules and cmdlets that currently exist in PowerShell 5.
PowerShell Core will not replace PowerShell
Earlier I explained that even though PowerShell Core is being treated as PowerShell 6, it does not mean that PowerShell 5 is going away. For right now, Microsoft could not do away with PowerShell 5 even if it wanted to, because as you saw, PowerShell Core is currently far less powerful than PowerShell 5.
Microsoft is going to keep working on PowerShell Core and one day its capabilities will presumably meet or exceed those of Windows PowerShell. Even then, however, Microsoft is not planning on phasing out PowerShell 5.
Going forward, Microsoft’s plan is to only provide bug fixes and security updates to PowerShell 5. The idea is to make PowerShell 5 a very stable and reliable platform that is not going to be significantly modified.
While consistency is going to be the name of the game for PowerShell 5 going forward, the same cannot be said of PowerShell 6. Like PowerShell 5, PowerShell 6 will receive security updates and bug fixes, but it is also going to be getting feature updates over time. Hence, PowerShell 6 will be the command environment of choice for those who want to have the latest and greatest capabilities.
16 thoughts on “PowerShell Core vs. PowerShell: What are the differences?”
very useful information. Thank you Brien Posey
I am glad that you found it helpful. Thanks!
Solid information. Many thanks Brien
Thanks Daniel! I’m glad that you liked it.
Well, there are 3 different shells available in windows: cmd, powershell and powershell core. I think we need more )
I understand that there are reasons, but confusion is strong
thank you, brien!
Illia you forgot about the Windows Subsystem for Linux 🙂 but I also think we cannot have enough shells
thanks for the explanation!
I’m glad you liked it Javi!
Thank you Brien, for a great post!
On my machine the count returned by Get-Command * is only 2602.
Get-Module lists the same three modules as in your example (Management, Utility and PSReadLine).
Can you suggest a reason why my command count is so much lower than yours (7,678)? Am I missing something really obvious?
I am running windows 10 pro 1909 and PS 5.1.18362.628.
I do not yet have PS Core installed
The commands that are available depend on what is installed on the machine. I probably have some Windows components and utilities installed that you don’t. I wouldn’t worry about only having 2602 cmdlets.
as long as core isn’t a feature of windows my company will never allow it shame, i really like the multi-threading features introduced in PowerShell 7.
I’m sure that Microsoft will probably include it in the operating system eventually.
Thank you very much for the info.
Trying to administrate our 365 tenant using Powershell 7 on a Mac is very difficult right now. I always have to run Windows via VMware because a lot of modules are missing from PowerShell Core.
Do you believe that in the future all these modules will make their appearance in PowerShell Core?
Thank you in advance.
Maybe. The impression that I get is that Microsoft is working to standardize PowerShell across platforms. My guess is that eventually PowerShell will consist of a core set of cmdlets and a large collection of downloadable modules.
thanks for nice post Brien!!
Is it possible to run powershell script in MacOS where powershell core 6.0 is installed?
Glad I found this explanation as I have been banging my head for a week trying to find why PS1 scripts that work fine in Win10 [PShell ver 5.1.1]are generating so many errors in a machine that has PowerShell Core [ver 7.0.1 after todays update of 6.x.x] in it 2/3/22