Paul Krill
Editor at Large

PowerShell 7.0 arrives with pipeline parallelization

news
Mar 6, 20202 mins

Major PowerShell update supports parallel execution, adds new operators, and enhances module import and error capabilities

nautilus shell
Credit: Thinkstock

Microsoft is shipping PowerShell 7.0, a major update to the cross-platform automation tool and configuration framework. Highlights of the new version, introduced March 4, include pipeline parallelization and new operators.

PowerShell 7.0 introduces the new Parallel parameter for the ForEach-Object cmdlet, allowing you to run a script block in parallel for each element in a collection by using the ForEach-Object -Parallel syntax.

PowerShell 7.0 introduces new operators as well, including a ternary operator identified as a ? b :c, and pipeline chain operators, || and &&. Null conditional operators include ?? and ??=.

Other capabilities in PowerShell 7.0 include:

  • A simplified, dynamic error view.
  • A GetError cmdlet to ease error investigations.
  • A compatibility layer for importing modules in an implicit Windows PowerShell session.
  • Invoking of DSC (Desired State Configuration) resources directly from PowerShell 7.0. This is an experimental feature.
  • Automatic notifications of new versions.

PowerShell runs on Windows, Linux, or MacOS and is optimized for dealing with structured data such as JSON, CSV, and XML. A command-line shell and object-oriented scripting language are featured, as well.

PowerShell 7.0 installs to a new directory and runs side-by-side with Windows PowerShell 5.1. It is an in-place upgrade for PowerShell Core 6.x. A binary package of PowerShell 7.0 can be installed from GitHubDocker container images are also available.

PowerShell 7.0 follows the announcement three years ago of PowerShell Core 6, a community edition of the tool, built on top of open source .NET Core, that introduced cross-platform support. PowerShell 7.0 marks a shift to .NET Core 3.1.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author