Microsoft releases PowerShell 7 for Windows, macOS and Linux
Microsoft has announced that its cross-platform automation tool and configuration framework PowerShell 7 is now Generally Available.
Available for Windows, macOS and Linux, PowerShell 7 sees Microsoft moving from .NET Core 2.x to 3.1 which enables greater backwards compatibility with existing Windows PowerShell modules thanks to the resurrection of numerous .NET Framework APIs. The cross-platform nature of PowerShell 7 means that Ubuntu, openSUSE, Fedora, Debian and other Linux distro are embraced.
- Install the latest PowerToys update for important bug fixes
- Microsoft gives us a preview of a new Start menu concept for Windows 10
- Microsoft starts rolling out new icons to all Windows 10 users
Joey Aiello, product manager of PowerShell, says: "If you weren't able to use PowerShell Core 6.x in the past because of module compatibility issues, this might be the first time you get to take advantage of some of the awesome features we already delivered since we started the Core project!"
The full list of supported operating systems is given as x64 variants of Windows 7, 8.1, and 10, Windows Server 2008 R2, 2012, 2012 R2, 2016, and 2019, macOS 10.13+, Red Hat Enterprise Linux (RHEL) / CentOS 7+, Fedora 29+, Debian 9+, Ubuntu 16.04+, openSUSE 15+ and Alpine Linux 3.8+. ARM32 and ARM64 flavors of Debian and Ubuntu are also supported as is ARM64 Alpine Linux. Microsoft says that while they are not officially support, there are community-produced packages available for Arch and Kali Linux.
Aiello highlights some of the new features that can be found in PowerShell 7:
- 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 to invoke DSC resources directly from PowerShell 7 (experimental)
Full details can be found in the PowerShell 7 release notes.
Microsoft is already looking to the future and has a new version in the pipeline:
We're already hard at work on PowerShell 7.1, and you should expect its first preview soon, chock full of new features and bugfixes that didn’t quite make it into 7.0. Stay tuned for a more in-depth roadmap blog outlining our current investigations and desires for 7.1.