Skip to content

Fixes #12879 - Add note about Property wrapping in ForEach() method#12882

Merged
sdwheeler merged 2 commits intoMicrosoftDocs:mainfrom
sdwheeler:sdw-w564221-i12879-foreach
Mar 24, 2026
Merged

Fixes #12879 - Add note about Property wrapping in ForEach() method#12882
sdwheeler merged 2 commits intoMicrosoftDocs:mainfrom
sdwheeler:sdw-w564221-i12879-foreach

Conversation

@sdwheeler
Copy link
Copy Markdown
Collaborator

@sdwheeler sdwheeler commented Mar 24, 2026

PR Summary

Add note about Property wrapping in ForEach() method

PR Checklist

  • Descriptive Title: This PR's title is a synopsis of the changes it proposes.
  • Summary: This PR's summary describes the scope and intent of the change.
  • Contributor's Guide: I have read the contributor's guide.
  • Style: This PR adheres to the style guide.

Copilot AI review requested due to automatic review settings March 24, 2026 13:55
@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the about_Arrays documentation across supported versions to clarify the semantics of the intrinsic .ForEach('PropertyName') overload when the targeted property value is itself a collection.

Changes:

  • Added a NOTE and example showing that .ForEach('Value') returns one result per input object, so array-valued properties become nested collections (requiring double indexing like [0][0]).
  • Updated ms.date in all touched docs to reflect the edit date.
  • Fixed the PowerShell 7.4 “online version” link to point at the 7.4 view.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.

File Description
reference/7.6/Microsoft.PowerShell.Core/About/about_Arrays.md Adds NOTE + example documenting .ForEach('PropertyName') wrapping/nesting behavior; updates ms.date.
reference/7.5/Microsoft.PowerShell.Core/About/about_Arrays.md Same NOTE + example and ms.date update for 7.5 content.
reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md Same NOTE + example and ms.date update; corrects “online version” link to the 7.4 view.
reference/5.1/Microsoft.PowerShell.Core/About/about_Arrays.md Same NOTE + example and ms.date update for 5.1 content.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread reference/7.5/Microsoft.PowerShell.Core/About/about_Arrays.md Outdated
Comment thread reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md Outdated
Comment thread reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md Outdated
Comment thread reference/5.1/Microsoft.PowerShell.Core/About/about_Arrays.md Outdated
Comment thread reference/5.1/Microsoft.PowerShell.Core/About/about_Arrays.md Outdated
Comment thread reference/7.6/Microsoft.PowerShell.Core/About/about_Arrays.md Outdated
Comment thread reference/7.6/Microsoft.PowerShell.Core/About/about_Arrays.md Outdated
Comment thread reference/7.5/Microsoft.PowerShell.Core/About/about_Arrays.md Outdated
@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 49e015e:

✅ Validation status: passed

File Status Preview URL Details
reference/5.1/Microsoft.PowerShell.Core/About/about_Arrays.md ✅Succeeded View (powershell-5.1)
reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md ✅Succeeded View (powershell-7.4)
reference/7.5/Microsoft.PowerShell.Core/About/about_Arrays.md ✅Succeeded View (powershell-7.5)
reference/7.6/Microsoft.PowerShell.Core/About/about_Arrays.md ✅Succeeded View (powershell-7.6)

For more details, please refer to the build report.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit aa8947c:

✅ Validation status: passed

File Status Preview URL Details
reference/5.1/Microsoft.PowerShell.Core/About/about_Arrays.md ✅Succeeded View (powershell-5.1)
reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md ✅Succeeded View (powershell-7.4)
reference/7.5/Microsoft.PowerShell.Core/About/about_Arrays.md ✅Succeeded View (powershell-7.5)
reference/7.6/Microsoft.PowerShell.Core/About/about_Arrays.md ✅Succeeded View (powershell-7.6)

For more details, please refer to the build report.

@sdwheeler sdwheeler merged commit ea32d33 into MicrosoftDocs:main Mar 24, 2026
5 checks passed
@sdwheeler sdwheeler deleted the sdw-w564221-i12879-foreach branch March 24, 2026 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need additional documentation on how the instrinsic ForEach method wraps results in a collection

3 participants