Earlier this year — April 7, 2019 to be specific — MS announced PowerShell 7. Earlier editions of this development fork had been called “PowerShell Core” to distinguish it from the built-in version included with Windows 10 and Windows Server 2016. But with the introduction of PowerShell 7, MS wants to foster what it calls “a full replacement of Windows PowerShell 5.1 with our next release” (namely PowerShell 7). Their idea is to merge the two development forks going forward, so that “Windows PowerShell and PowerShell Core users will be able to use the same version of PowerShell to automate across Windows, Linux, and macOS.” Thus, the company is dropping the “Core” nomenclature — though it still shows up in PSEdition values from the runtime environment — to make references to PowerShell in product pages and documentation simpler and more streamlined.With all this in mind, there’s a new version of PowerShell ready and available for download. I’ll guide you to necessary documentation and walk you through installation, invocation, and inspection of PowerShell 7 in this story. Let’s do this!
Getting Started: Download and Install
The PowerShell Docs still use the old Core nomenclature. Lots of good information is available in the PowerShell pages, under the heading of “Installing various versions of PowerShell.” Though you will find documents for Linux, macOS, and ARM-based devices, for most Win10.Guru readers the key document is named “Installing PowerShell Core on Windows.” While I describe one way to do this here, that file explains how to install from File Explorer, from an administrative command line, using a ZIP package, deploying on Windows IoT and Nano Server, and more. Those interested in such things are advised to turn to the afore-linked Docs item for all that information. Here, we’re simply going to double-click the self-installing executable (.MSI) file that we download from the GitHub PowerShell repository.
Grab Your Proper Executable
The various versions of the executable are available from the GitHub PowerShell releases page. Scroll down to the Assets section beneath the long list of updates, fixes, and so forth. Grab the Windows version that’s right for your PC. Here’s a snippet from that section for guidance:
I grabbed the MSI named PowerShell-7.0.0.preview.1-win-x64 to match my 64-bit Windows 10 desktop version.
Once you grab the .MSI version that’s right for your PC, all you need to do to install it is to double-click the file in File Explorer. This launches the Setup Wizard, which then goes to work (featuring a splashy superheroine avatar throughout):
As it should, the Setup Wizard guides you throughout the install process. I stuck with the defaults; it was done quickly.
Just click your way through the half-dozen screens in the sequence and you’ll have access to the PowerShell 7 preview. You can opt the click the “Launch PowerShell” checkbox on the final setup screen, or you can navigate through the Start menu to fire off this PowerShell version (Start → PowerShell → PowerShell 7-preview (x64) on my PC. YMMV).
Inspecting PowerShell Version 7 Preview
When PowerShell 7 launches it presents a command window with a light-grey background by default. This immediately distinguishes it from the royal blue background that comes up for the built-in PowerShell on Windows 10 PCs (version 5.1 on my PC). I’ve also displayed the values for the $PSVersionTable variable in the following screen cap so you can see what kind of information PowerShell 7 will tell you about itself.
The application header shows the major version info, but the interior provides a complete version specifier, plus other descriptive info about PowerShell 7.
What’s different from the built-in PowerShell vis-a-vis Version 7? This cross-platform version is built around a different runtime environment, including the Universal C Runtime and the .NET Core Runtime (both of which work on all the major desktop OSes). The older 5.1 version is built on the .NET Framework, which is more mature and supports a wider range of capabilities. Right now, PowerShell 7 does not have all the cmdlets (2924 for 5.1 versus 2487 for 7) or modules (87 for 5.1 versus 64 for 7) that 5.1 does. But with time, as MS seeks to move admins, programmers, devops professionals, and other heavy-duty PowerShell users over from 5.1 to 7, that balance should right itself, and eventually tilt in 7’s favor. In the meantime, download and run this new environment, but don’t expect that everything that works for you today in 5.1 will also work in 7. You’ll have to try things out, and see what happens!
Author: Ed Tittel
Ed Tittel is a 30-plus-year computer industry veteran. He’s a Princeton and multiple University of Texas graduate who’s worked in IT since 1981 when he started his first programming job. Over the past three decades he’s also worked as a manager, technical evangelist, consultant, trainer, and an expert witness. See his professional bio for all the details.