PowerShell 7.0 Released

PowerShell 7.0 features Pipeline parallelization.

Microsoft has announced the Generally Available (GA) release of PowerShell 7.0.
PowerShell is a cross-platform automation tool and configuration framework optimized for dealing with structured data, REST APIs, and object models.
Apart from the usual slew of new cmdlets/APIs and bug fixes, the latest release is introducing a number of new features, including:
  • Pipeline parallelization with ForEach-Object -Parallel
  • New operators like Ternary operator: a ? b : c, Pipeline chain operators: || and &&, and Null coalescing operators: ?? and ??=
  • A new simplified and dynamic error view and Get-Error cmdlet for more comfortable investigation of errors
  • A new compatibility layer that enables you to import modules in an implicit Windows PowerShell session
  • Automatic new version notifications
  • The capability to invoke to invoke DSC resources directly from PowerShell 7(experimental)
Source: Microsoft
Now, the ForEach-Object cmdlet, which is used to iterate items in a collection, comes with built-in parallelism with the new Parallel parameter. The "Parallel" parameter specifies the script block that is run in parallel for each input log name. And the new "ThrottleLimit" parameter limits the no of script blocks running in parallel at a given time. The default value is 5.
For more details, you can visit the release notes here.