Print

User Rating: 4 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Inactive
 

I've been having a great time exploring the new open-source, cross-platform version of PowerShell core on my Windows PC and on my Mac (yes, I have a MacBook Air!). When I mention this to folks, they give me that crinkled look. Either they're very busy, and I understand, or they assume that open-source PowerShell is for developers. It's written in C#, it needs to be compiled and built, and it's in GitHub, which really isn't for everyone.

But, no! PowerShell 6 (officially, PowerShell 6-alpha) is for everyone! Even if you're not a developer, you can download and install it, play with it, and update it very easily. You don't need to mess with GitHub. You don't need to learn C#. You don't need to install Visual Studio. You don't need to build or compile anything.

Here's how!

 

Download the installer

The PowerShell team offers installers for the latest version of open-source PowerShell. To download an earlier version or learn how each version differs, see the Releases page.

  1. Go to: https://github.com/PowerShell/PowerShell. You don't need a GitHub account.
  2. Scroll down to the Get PowerShell section. Ignore the file list at the top of the page.
  3. Find your operating system and click the corresponding link in the Downloads column, then save the installation. 

image001

 

If you can't find your operating system in the list, you can't install PowerShell 6. Sorry!

 

Check the file hash (optional)

To make sure that your downloaded installer file hasn't been tampered with or changed, verify that file hash of the downloaded file is the same as the file hash of the file that the team released.

A file hash, also known as a checksum, is a alphanumeric representation of file content that is independent of the file name or location. When the file hash of a downloaded file matches the file hash of the original, you can be confident that the content of the files is identical.

This step is completely optional, but it's a best practice when you download any file from the internet, especially a file that runs, like an exe or an installer.


To verify the file hash:
Use any of the following methods.

PS C:\> .\Test-PSFileHash.ps1 -Path $home\Downloads\PowerShell_6.0.0.12-alpha.12-win10-x64.msi
True

-or-

PS C:\> Get-FileHash -Path $home\Downloads\PowerShell_6.0.0.12-alpha.12-win10-x64.msi

Algorithm       Hash                                                                   Path
---------       ----                                                                   ----
SHA256          F3C3F3276462588E24BFE197DAA8795140E37557596861126D54462561C98671       C:\Users\juneb...

Then, compare the value of the Hash property with the file hash listed for the installer on the Releases page.

image002

Run it!

Run the installer and accept the license agreement (after reading about it).

On Windows, by default, the installers install PowerShell 6-alpha in $env:ProgramFiles\PowerShell\<GitVersion>, such as C:\Program Files\PowerShell\6.0.0.12. Notice that the installation directory is PowerShell, not Windows PowerShell. (I get a kick out of seeing that.) Also, because the installation directory has the Git version number (aka "GitCommitId"), you can have multiple versions of PowerShell 6-alpha installed and running side by side. 

On a Mac, to allow the downloaded installer to run, ctrl-click the pkg file and click Open (unknown developer lockout).


To run PowerShell 6-alpha:

Cool, eh? By default, the PowerShell 6-alpha window has a black background, so you can distinguish it from Windows PowerShell. I pin the window to my taskbar.

image003

 

 

Congratulations and welcome to the world of open-source, cross-platform core PowerShell. There are lots of new things in this version, including a new SemanticVersion object in $PSVersionTable.PSVersion. Most importantly, the team releases a new Git version of PowerShell 6-alpha about every two weeks, so have fun with your version, but be sure to check GitHub at @SAPIENTech on Twitter for new releases.

PowerShell Studio doesn't support PowerShell 6-alpha, because it's an alpha. But you can run PowerShell Studio scripts in your PowerShell 6 window. In PowerShell Studio, right-click a script tab, click Copy File Path, and then paste the path in your PowerShell 6-alpha console. Be sure to dot-source it, if necessary.

 

June Blender is a technology evangelist at SAPIEN Technologies, Inc. and a Microsoft Cloud and Datacenter MVP. You can reach her at This email address is being protected from spambots. You need JavaScript enabled to view it. or follow her on Twitter at @juneb_get_help.

 

If you have questions about our products, please post in our support forum.
For licensed customers, use the forum associated with your product in our Product Support Forums for Registered Customers.
For users of trial versions, please post in our Former and Future Customers - Questions forum.