PowerShell version 7 is currently in preview and while it can be installed on Windows, Linux, and macOS, the examples shown in this blog article focus on installing it on a Windows based system, specifically Windows 10 using Windows PowerShell version 5 or higher which ships by default with Windows 10. Your mileage may vary with other operating systems, other versions of Windows, and/or other versions of Windows PowerShell.
The easiest way that I’ve found to install the preview of PowerShell version 7 is to first install Jeff Hicks' PSReleaseTools PowerShell module from the PowerShell Gallery using Windows PowerShell.
Install-Module -Name PSReleaseTools -Force
The first portion of the command needs to narrow the results down to a single item. If the
parameter is omitted, this command installs the latest version of PowerShell Core version 6 instead
Get-PSReleaseAsset -Family Windows -Only64Bit -Format msi -Preview | Save-PSReleaseAsset -Path $env:USERPROFILE\Downloads -Passthru | Invoke-Item
The remainder of the installation is a clicker-size.
Want something even simpler and want to avoid the GUI clicker-size? Silently download and install the preview of PowerShell version 7 using the following command that’s also part of the PSReleaseTools module.
Install-PSPreview -Mode Quiet
Jeff Hicks' PSReleaseTools module can also be found on GitHub. That’s where I’d recommend reporting any problems you run into with it and I’m also sure that Jeff would welcome pull requests with bug fixes and/or feature enhancements.