PowerShell Core 6.0 is a new edition of PowerShell that is cross-platform (Windows, MacOS, and Linux), open-source, and built for heterogeneous environments including hybrid cloud. The purpose of this article is to install PowerShell Core on a Windows Server. PowerShell Core it is also one of the requirements to install the latest versions of VMware PowerCLI now running on major version 10.
What are the benefits to install PowerShell Core and why should I use it?
PowerShell Core is a multiplatform solution that can be deployed on different operating systems and IOT devices (ARM in a first place!) bringing an heterogeneus environment for automation and orchestration. PowerShell Core is based on the CoreCLR whereas the previous versions of Windows PowerShell are based on FullCLR. New functionalities and features will be added to PowerShell Core first whereas Windows PowerShell will get only new updates for bugfixes.
There are plenty of features that help us deciding to install PowerShell Core. Most notably:
- Moved from .NET Framework to .NET Core
- Support for macOS and Linux
- Support for side-by-side installations
- Backwards compatibility with Windows PowerShell
- Docker support
- SSH-based PowerShell Remoting
- and a lot more..
A full list of features is available at this link.
The installation process is very quick and wizard driven. At the time of writing the latest version available is 6.0.4. The screenshots refer to the 6.0.2 which is very similar with regard to installation process.
Ok I’m in! Where can I get the latest version of PowerShell Core?
The latest versions to install PowerShell Core can be found at https://github.com/PowerShell/PowerShell
Does PowerShell Core affect my Windows PowerShell installation?
Nope! PowerShell Core is completely side-by-side with Windows PowerShell. In fact, an awesome feature of PowerShell Core is that you can test new versions without affecting existing workloads. Whether it’s installed via an MSI or installed portably from the ZIP package, your Windows PowerShell installation is not affected by PowerShell Core.
Which modules work with PowerShell Core?
The following set of “built-in” modules are part of PowerShell Core:
- CimCmdlets
- Microsoft.PowerShell.Archive
- Microsoft.PowerShell.Diagnostics
- Microsoft.PowerShell.Host
- Microsoft.PowerShell.Management
- Microsoft.PowerShell.Security
- Microsoft.PowerShell.Utility
- Microsoft.WSMan.Management
- PackageManagement
- PowerShellGet
- PSDesiredStateConfiguration
- PSDiagnostics
- PSReadLine
What about Micorosft and other modules from 3rd-parties?
Microsoft modules are generally in one of three categories:
- Modules that ship as part of Windows client or Windows Server
- Modules that ship as a part of a Microsoft product
- Modules that ship on the PowerShell Gallery. For example, Azure PowerShell is delivered via the Gallery.
At this point we are ready to install PowerShell Core!
How to install PowerShell Core on Windows OS
From the GitHub site let’s download the latest version of PowerShell Core. The table offers both links to stable and preview versions. In this instance the installation covers the stable version for Windows (x64) currenlty at 6.0.4. When created the installation the stable version was 6.0.2. This article uses that one.
Package on its own is not big and the self contained msi installer ia aboiut 50MB. Let’s hit on next to continue.
And accept the EULA to continue.
We can provide a different installation path from default. This will not impact the installation of other PowerShell Core deployments on the same machine.
The PowerShell Core wizard is now ready to copy files.
After a few seconds the process to install PowerShell Core is completed. We can either launch the PowerShell console from the wizard or use the command “pwsh.exe”
From the Windows command prompt we can issue the “pwsh.exe” to start the PowerShell core console. It’s time to get a little familiar with this new console even though PowerShell Core fully supports existing Windows PowerShell releases. Next step is to install the VMware PowerCLI.
Add Comment