Installing PowerShell 6 - For Everyone
- Written by June Blender
- Last Updated: 14 November 2017
- Created: 16 November 2016
- Hits: 19288
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.
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.
- Go to: https://github.com/PowerShell/PowerShell. You don't need a GitHub account.
- Scroll down to the Get PowerShell section. Ignore the file list at the top of the page.
- Find your operating system and click the corresponding link in the Downloads column, then save the installation.
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.
- Use Test-PSFileHash.ps1 (3.0+). Download the zip file and extract the script. To run it, set the value of the Path parameter to the installer file that you downloaded. The script returns True if the file hash matches; otherwise false.
PS C:\> .\Test-PSFileHash.ps1 -Path $home\Downloads\PowerShell_22.214.171.124-alpha.12-win10-x64.msi True
- On Windows, run the Get-FileHash cmdlet (5.0+) on the installer file that you downloaded. On Mac or Linux, run any tool that gets SHA256 hashes or checksums, such as shasum.
PS C:\> Get-FileHash -Path $home\Downloads\PowerShell_126.96.36.199-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.
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\188.8.131.52. 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:
- On Windows, In the installation directory (C:\Program Files\PowerShell\<version>), double-click PowerShell.exe.
- On Mac, in Terminal, type powershell. For help with configuring PowerShell on a Mac, see Setting Up PowerShell on Your Mac.
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.
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.