-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-parallelismArea - Parallel processing (ForEach-Object, Jobs, etc)Area - Parallel processing (ForEach-Object, Jobs, etc)issue-doc-ideaIssue - request for new contentIssue - request for new contentup-for-grabsTag - issue is open for any contributor to resolveTag - issue is open for any contributor to resolve
Description
It would be great if we could get more examples of some complex scenarios using the -Parallel parameter. Recently I wanted to use Write-Progress, but as I had assumed, it doesn't work across runspaces. I resorted to using the concurrent bag collection to add objects at the start of the runspace and then get the count of items and then over-write the same line with "x of n completed" sort of thing. If there is a better way to do this I would love to see some examples.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: da56c3ce-409c-dd44-888b-6a875e93d4a4
- Version Independent ID: 7ba53b91-ed64-cc24-0cf0-a5dc3f3dc9d0
- Content: ForEach-Object (Microsoft.PowerShell.Core)
- Content Source: reference/7.1/Microsoft.PowerShell.Core/ForEach-Object.md
- Product: powershell
- GitHub Login: @SteveL-MSFT
- Microsoft Alias: slee
Metadata
Metadata
Assignees
Labels
area-parallelismArea - Parallel processing (ForEach-Object, Jobs, etc)Area - Parallel processing (ForEach-Object, Jobs, etc)issue-doc-ideaIssue - request for new contentIssue - request for new contentup-for-grabsTag - issue is open for any contributor to resolveTag - issue is open for any contributor to resolve