Microsoft today announced that PowerShell 7, the latest version of its command-line-based configuration tool, is now generally available. When we say PowerShell, we"re referring to PowerShell Core, the cross-platform version of the tool that was first announced back in 2016, but Microsoft is now referring to it simply as PowerShell 7. This is because the company believes it has achieved as much backwards compatibility with Windows PowerShell as possible, and so, going forward, the cross-platform version of PowerShell will be the "one, true PowerShell".
There are a handful of changes with PowerShell 7, starting with the underlying technology. Microsoft has moved from .NET Core 2.x to .NET Core 3.1, which was made generally available in December. This is part of what enables greater backwards compatibility with Windows PowerShell modules, but even if that"s not enough, there"s a new UseWindowsPowerShell switch to Import-Module, so you can force modules to run on the classic Windows PowerShell if needed. You can head here for a detailed look at everything that"s new, but here are the highlights of this release:
- Pipeline parallelization with ForEach-Object -Parallel
- New operators:
- Ternary operator: a ? b : c
- Pipeline chain operators: || and &&
- Null conditional operators: ?? and ??=
- A simplified and dynamic error view and Get-Error cmdlet for easier investigation of errors
- A compatibility layer that enables users to import modules in an implicit Windows PowerShell session
- Automatic new version notifications
- The ability to invoke DSC resources directly from PowerShell 7 (experimental)
In addition to these changes, there are also new cmdlets, APIs, and fixes in this release, which you"ll see in full detail here once the changelog is available.
Microsoft is also changing the way it supports PowerShell releases, aligning them with the support dates of the underlying version of .NET Core. Since .NET Core 3.1 is a long-term support release, it will be supported for three years from December 3, 2019, and so will PowerShell 7.
If you"re interested, you can download PowerShell 7 here. It"s supported by 64-bit flavors of Windows (7, 8.1, and 10), macOS, and multiple Linux distributions. ARM32 and ARM64 versions of Debian and Ubuntu are also supported, as also are ARM64 versions of Alpine Linux. Curiously, Windows on ARM devices are not supported.