电源外壳 7.0 Generally Available.
What is PowerShell 7?
电源外壳 7 is the latest major update to 电源外壳, a cross-platform (视窗, 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. 电源外壳 includes a command-line 壳, object-oriented scripting language, and a set of tools for executing scripts/cmdlets and managing modules.
After three successful releases of 电源外壳 Core, we couldn’t be more excited about 电源外壳 7, the next chapter of PowerShell’s ongoing development. 和 电源外壳 7, in addition to the usual slew of new cmdlets/APIs and bug fixes, we’re introducing a number of new features, 包括:
- Pipeline parallelization with
ForEach-Object -Parallel
- New operators:
- Ternary operator:
a ? b : c
- Pipeline chain operators:
||
和&&
- Null coalescing operators:
??
和??=
- Ternary operator:
- A simplified and dynamic 错误 view and
Get-Error
cmdlet for easier investigation of errors - A compatibility layer that enables users to import modules in an implicit 视窗 电源外壳 session
- Automatic new version notifications
- The ability to invoke to invoke DSC resources directly from 电源外壳 7 (experimental)
The shift from 电源外壳 Core 6.x to 7.0 also marks our move from .网 Core 2.x to 3.1. .网 Core 3.1 brings back a host of .网 Framework APIs (especially on 视窗), enabling significantly more backwards compatibility with existing 视窗 电源外壳 modules. This includes many modules on 视窗 that require 图形用户界面 functionality like Out-GridView
和 Show-Command
, as well as many role management modules that ship as part of 视窗.
Awesome! How do I get PowerShell 7?
First, check out our install docs for 视窗, 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 微星指数, ZIP, RPM, or something else), hop on over to our latest release tag on GitHub.
此外, you may want to use one of our many Docker container images.
What operating systems does PowerShell 7 support?
电源外壳 7 supports the following operating systems on x64, 包括:
- 视窗 7, 8.1, 和 10
- Windows服务器 2008 R2, 2012, 2012 R2, 2016, 和 2019
- macos 10.13+
- 红帽企业 Linux (RHEL) / 中央操作系统 7+
- Fedora 29+
- 德班 9+
- 乌班图 16.04+
- openSUSE 15+
- Alpine Linux 3.8+
- ARM32 and ARM64 flavors of Debian and 乌班图
- ARM64 Alpine Linux
Wait, what happened to PowerShell “Core”?
Much like .网 decided to do with .网 5, we feel that 电源外壳 7 marks the completion of our journey to maximize backwards compatibility with 视窗 电源外壳. To that end, we consider 电源外壳 7 and beyond to be the one, 真的 电源外壳 going forward.
电源外壳 7 will still be noted with the edition “Core” in order to differentiate 6.x/7.x from 视窗 电源外壳, 但总的来说, you will see it denoted as “PowerShell 7” going forward.
Which Microsoft products already support PowerShell 7?
Any module that is already supported by 电源外壳 Core 6.x is also supported in 电源外壳 7, 包括:
- 天蓝色 电源外壳 (
Az.*
) - 活动目录
- Many of the modules in 视窗 10 和 Windows服务器 (check with
Get-Module -ListAvailable
)
On 视窗, we’ve also added a -UseWindowsPowerShell
switch to Import-Module
to ease the transition to 电源外壳 7 for those using still incompatible modules. This switch creates a proxy module in 电源外壳 7 that uses a local 视窗 电源外壳 process to implicitly run any cmdlets contained in that module.
For those modules still incompatible, we’re working with a number of teams to add native 电源外壳 7 support, including Microsoft Graph, 办公室 365, 还有更多.