Deployment

Install PowerShell Core 6.0 on Windows

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.

domalab.com Install PowerShell Core table

Package on its own is not big and the self contained msi installer ia aboiut 50MB. Let’s hit on next to continue.

domalab.com Install PowerShell Core wizard

And accept the EULA to continue.

domalab.com Install PowerShell Core eula

We can provide a different installation path from default. This will not impact the installation of other PowerShell Core deployments on the same machine.

domalab.com Install PowerShell Core location

The PowerShell Core wizard is now ready to copy files.

domalab.com Install PowerShell Core ready

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”

domalab.com Install PowerShell Core completed

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.

domalab.com Install PowerShell Core pwsh.exe console

About the author

Michele Domanico

Passionate about Virtualization, Storage, Data Availability and Software Defined Data Center technologies. The aim of Domalab.com is sharing with the Community the knowledge and experience gained with customers, industry leaders and like minded peers. Always open to constructive feedback and new challenges.

Add Comment

Click here to post a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Browse articles

September 2018
M T W T F S S
« Aug    
 12
3456789
10111213141516
17181920212223
24252627282930

Articles by Category

Archives

%d bloggers like this: