This post has been republished via RSS; it originally appeared at: Microsoft Developer Blogs - Feed.
Today, we're happy to announce the Generally Available (GA) release of PowerShell 7.0! Before anything else, we'd like to thank our many, many open-source contributors for making this release possible by submitting code, tests, documentation, and issue feedback. PowerShell 7 would not have been possible without your help.
For those unfamiliar, PowerShell 7 is the latest major update to PowerShell, a cross-platform (Windows, Linux, and macOS) automation tool and configuration framework optimized for dealing with structured data (e.g. JSON, CSV, XML, etc.), REST APIs, and object models. PowerShell includes a command-line shell, object-oriented scripting language, and a set of tools for executing scripts/cmdlets and managing modules. Three years ago, we announced PowerShell Core 6 as a completely new edition of PowerShell. Built on top of .NET Core, PowerShell Core introduced cross-platform support across Windows, macOS, and Linux, SSH-based PowerShell Remoting, massively improved support for REST and JSON, official Docker containers, and more. Additionally, it was the first release of PowerShell made under an open-source license (MIT), encouraging long-time PowerShell enthusiasts and complete newcomers alike to contribute directly to the source code, tests, and documentation. After three successful releases of PowerShell Core, we couldn't be more excited about PowerShell 7, the next chapter of PowerShell's ongoing development. With PowerShell 7, in addition to the usual What is PowerShell 7?slew of new cmdlets/APIs and bug fixes, we're introducing a number of new features, including:
- Pipeline parallelization with
ForEach-Object -Parallel
- New operators:
- Ternary operator:
a ? b : c
- Pipeline chain operators:
||
and&&
- Null coalescing operators:
??
and??=
- Ternary operator:
- 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)
Out-GridView
and Show-Command
, as well as many role management modules that ship as part of Windows. For more info, check out our module compatibility table showing off how you can the latest, up-to-date modules that work with PowerShell 7.
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!
First, check out our install docs for Awesome! How do I get PowerShell 7?Windows, macOS, or Linux. Depending on the version of your OS and preferred package format, there may be multiple installation methods. If you already know what you're doing, and you're just looking for a binary package (whether it's an MSI, ZIP, RPM, or something else), hop on over to our latest release tag on GitHub. Additionally, you may want to use one of our many Docker container images. For more information on using those, check out our PowerShell-Docker repo.
PowerShell 7 supports the What operating systems does PowerShell 7 support?following operating systems on x64, including:
- 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+
- Alpine Linux 3.8+
Much like Wait, what happened to PowerShell "Core"?.NET decided to do with .NET 5, we feel that PowerShell 7 marks the completion of our journey to maximize backwards compatibility with Windows PowerShell. To that end, we consider PowerShell 7 and beyond to be the one, true PowerShell going forward. PowerShell 7 will still be noted with the edition "Core" in order to differentiate 6.x/7.x from Windows PowerShell, but in general, you will see it denoted as "PowerShell 7" going forward.
Any module that is already supported by PowerShell Core 6.x is also supported in PowerShell 7, including: Which Microsoft products already support PowerShell 7?
- Azure PowerShell (
Az.*
) - Active Directory
- Many of the modules in Windows 10 and Windows Server (check with
Get-Module -ListAvailable
)
-UseWindowsPowerShell
switch to Import-Module
to ease the transition to PowerShell 7 for those using still incompatible modules. This switch creates a proxy module in PowerShell 7 that uses a local Windows PowerShell process to implicitly run any cmdlets contained in that module. For more information on this functionality, check out the Import-Module documentation.
For those modules still incompatible, we're working with a number of teams to add native PowerShell 7 support, including Microsoft Graph, Office 365, and more.
Azure Cloud Shell has already been updated to use PowerShell 7, and others like the .NET Core SDK Docker container images and Azure Functions will be updated soon.