Header Ads


Windows PowerShell Core (PowerShell 6.0)

PowerShell Core 6.0 is a new edition of PowerShell, Microsoft has released PowerShell Core, a new version of PowerShell. This new version of PowerShell is available on all the major computing platforms including Windows, Linux, and MacOS. Well, the latest version of Windows 10, comes out of the box with PowerShell 5.1, and this latest version of PowerShell Core v6.0.

PowerShell is a command line shell and scripting language from Microsoft. It ships with the Windows operating system, and it first made its appearance in 2006.

Well, now we do have two publicly available editions of PowerShell. The first is the PowerShell v5.1, and the second one is the newer PowerShell Core v6.0.

Windows PowerShell is built on .NET and can work with the actual .NET objects, which is one of its main strengths. The dependence on .NET has its downsides however. 

It’s a Microsoft proprietary technology and it is only available on Windows, which in today’s world is fairly limiting. And it has a very large footprint, especially if all your application needs are few basic HTTPS calls. To address all these and more, Microsoft released .NET Core – an open-source, cross-platform, minimal subset of .NET functionalities. And it’s what PowerShell Core is built on.In turn, this means that PowerShell Core is available on Windows, macOS and Linux. 

It is open-source and you can get the source code directly on GitHub. It also means that Core offers only a subset of the features “standard” PowerShell has. For example, the lack of support for Windows Forms in .NET Core means that you cannot use any UI elements in PowerShell Core, such as Show-Command or Out-GridView. Workflows are another example of functionality built on top of .NET that is missing in its Core variant. In effect, PowerShell Core does NOT replace “standard” PowerShell – in fact you can run both side by side. And you will have to do so for a while, especially when it comes to Office 365 management.

Difference between PowerShell & PowerShell Core

The first and foremost difference is as we know that PowerShell Core is cross-platform and runs on Windows, Linux, and MacOS while the old one runs on Windows only.

If you are curious, you can run PowerShell Core on unsupported ARM versions as well, but that is buggy and is expected to throw some errors.

PowerShell Core will be provided with new feature updates and fixes while the older PowerShell will just be provided bug fixes and security updates. This is an official statement from Microsoft about the same

Secondly, PowerShell Core is not as powerful as PowerShell that comes out of the box with Windows. The reason behind this is that the new PowerShell uses the less feature-rich .NET Core and .NET Standard and the older one uses older .NET Framework and .NET Standard.

The reason behind this is that .NET Core is new, and Microsoft needs time to make it as powerful as .NET Framework is now.

PowerShell Core
1.0 to 5.1
Platforms Supported
Only Windows (Client + Server)
Windows, Linux, and MacOS
.NET Framework
.NET Core
Depends on .NET Framework Runtime
Depends on .NET Core Runtime
Launched as
pwsh.exe on Windows and pwsh on MacOS and Linux
Set to Desktop
Set to Core
Future Updates for
Bug fixes and Security Updates only
Feature Update, Bug Fixes as well as Security Updates

If you want to try out PowerShell Core on your Windows, Linux or MacOS machine head over to the official GitHub repository page by browsing below URL and find the suitable version for your system.
PowerShell Core is now generally available and you might want to start looking into it, especially if you are managing a heterogeneous environment with different flavors of Windows and Linux devices. Keep in mind that Core is not positioned as a replacement for Windows PowerShell, so there is no immediate pressure on starting to port your scripts and tools to it. And there might never be! As this is the first public release, it seems like a good idea to wait for a while and give the authors of the different modules time to adapt their code to work within the constraints of .NET Core.

When it comes to using PowerShell Core for Office 365 management, things are currently… challenging. Of all the common workloads, only Exchange Online works flawlessly with PowerShell Core, but you must use the old basic authentication route. 

Working with the other workloads is currently not possible, as the ADAL libraries and their dependencies do not work with PowerShell Core, thus making authentication next to impossible. Another incompatibility is added by handling the JSON payload from any Graph API calls, which means that even if you do connect, you might not be able to execute any cmdlet.Overall, the Office 365 administrators should stick to using Windows PowerShell for the time being. 

Do keep an eye on PowerShell Core though, this is its initial Public version and compatibility with older PowerShell modules should improve in the future.

No comments:

Systemadminworld. Powered by Blogger.