-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Update ForEach-Object
example 17 to reflect current behavior
#11997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ForEach-Object
example 17 to reflect current behavior
#11997
Conversation
In PS v7.2, ForEach-Object -Parallel was updated to support variable access in nested script block scenarios. Example 17 in the docs currently reflects the erroneous behavior exhibited in v7.1 and prior. This change updates the example to reflect the fixed behavior in v7.2. See PS issue MicrosoftDocs#11817 for more information.
Learn Build status updates of commit c243621: ❌ Validation status: errorsPlease follow instructions here which may help to resolve issue. This comment lists only the first 25 files in the pull request. reference/7.4/Microsoft.PowerShell.Core/ForEach-Object.md
reference/7.5/Microsoft.PowerShell.Core/ForEach-Object.md
reference/7.6/Microsoft.PowerShell.Core/ForEach-Object.md
reference/7.4/CimCmdlets/Get-CimInstance.yml
reference/7.4/CimCmdlets/Get-CimSession.yml
reference/7.4/CimCmdlets/New-CimSession.yml
reference/7.4/CimCmdlets/New-CimSessionOption.yml
reference/7.4/CimCmdlets/Register-CimIndicationEvent.yml
reference/7.4/Microsoft.PowerShell.Core/Clear-Host.yml
reference/7.4/Microsoft.PowerShell.Core/Enable-PSRemoting.yml
reference/7.4/Microsoft.PowerShell.Core/Get-Command.yml
reference/7.4/Microsoft.PowerShell.Core/Get-Module.yml
This comment lists only the first 25 errors (including error/warning/suggestion) in the pull request. Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them. For any questions, please:
|
ExpectationsThanks for your submission! Here's a quick note to provide you with some context for what to expect from the docs team and the process now that you've submitted a PR. Even if you've contributed to this repo before, we strongly suggest reading this information; it might have changed since you last read it. To see our process for reviewing PRs, please read our editor's checklist and process for managing pull requests in particular. Below is a brief, high-level summary of what to expect, but our contributor guide has expanded details. The docs team begins to review your PR if you request them to or if your PR meets these conditions:
You can always request a review at any stage in your authoring process, the docs team is here to help! You do not need to submit a fully polished and finished draft; the docs team can help you get content ready for merge. While reviewing your PR, the docs team may make suggestions, write comments, and ask questions. When all requirements are satisfied, the docs team marks your PR as Approved and merges it. Once your PR is merged, it is included the next time the documentation is published. For this project, the documentation is published daily at 3 p.m. Pacific Standard Time (PST). |
@sdwheeler I've had a look, but it's not clear to me what's caused those validation errors/warnings. |
ForEach-Object -Parallel
example 17ForEach-Object
example 17 to reflect current behavior
Learn Build status updates of commit 1dcae2e: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
Within an example, the schema doesn't allow code blocks to be separated by paragraphs. |
Thanks Sean! |
PR Summary
In this PR,
ForEach-Object
example 17 is updated to reflect behavior consistent with PS v7.2+. Example 17 demonstrates use of variable access using nested-Parallel
script blocks.PR Context
In PS v7.2,
ForEach-Object -Parallel
was updated to correctly support variable access in nested script block scenarios. See:Example 17 in the docs currently reflects the erroneous behavior exhibited in v7.1 and prior. This example was added as part of:
PR Checklist