[{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27999","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27999/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27999/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27999/events","html_url":"https://github.com/PowerShell/PowerShell/pull/27999","id":5405440665,"node_id":"PR_kwDOAvT7bc8AAAABC5-hcg","number":27999,"title":"Keep custom object types in array type inference","user":{"login":"mazyn","id":39058611,"node_id":"MDQ6VXNlcjM5MDU4NjEx","avatar_url":"https://avatars.githubusercontent.com/u/39058611?v=4","gravatar_id":"","url":"https://api.github.com/users/mazyn","html_url":"https://github.com/mazyn","followers_url":"https://api.github.com/users/mazyn/followers","following_url":"https://api.github.com/users/mazyn/following{/other_user}","gists_url":"https://api.github.com/users/mazyn/gists{/gist_id}","starred_url":"https://api.github.com/users/mazyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mazyn/subscriptions","organizations_url":"https://api.github.com/users/mazyn/orgs","repos_url":"https://api.github.com/users/mazyn/repos","events_url":"https://api.github.com/users/mazyn/events{/privacy}","received_events_url":"https://api.github.com/users/mazyn/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":2,"created_at":"2026-09-09T22:35:30Z","updated_at":"2026-09-09T22:41:52Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":true,"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/27999","html_url":"https://github.com/PowerShell/PowerShell/pull/27999","diff_url":"https://github.com/PowerShell/PowerShell/pull/27999.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/27999.patch","merged_at":null},"body":"# PR Summary\n\nTab completion now offers the members of custom objects collected in an array literal, so `[pscustomobject]@{Test=\"Hej\"},[pscustomobject]@{Test=\"Hej2\"} | Select-Object <Tab>` completes `Test`, just as the single object form already did.\n\nThe same inference fix also reaches `| Where-Object`, `| ForEach-Object { $_. }`, indexing (`(...)[0].`), and chained `Select-Object`.\n\n## PR Context\n\nFix #25697\n\nA `[pscustomobject]` literal is inferred as a `PSSyntheticTypeName`: a `PSTypeName` whose CLR `Type` is `PSObject`, carrying the inferred members alongside it. `GetArrayType` built the array type with `foundType.Type.MakeArrayType()`, and for a synthetic element that `Type` is just `PSObject`, so the members were discarded. That is the line the issue points at.\n\nFixing only that is not enough. `GetInferredEnumeratedTypes` is what unwraps an array back to an element type for pipeline completion, and it rebuilt a plain `PSTypeName`, dropping the members a second time. The members have to survive a full element to array to element round trip, so `PSSyntheticTypeName` now models an array by holding its synthetic element type, and both the construction and the enumeration path preserve it.\n\nTwo adjacent sites branch on `is PSSyntheticTypeName` and had to distinguish the new array shape:\n\n- `InferTypeFrom(IndexExpressionAst)` yields the member types, which is correct for `$hashtable['key']` but wrong for an array. It now yields the element type when the target is an array.\n- `CompleteIndexExpression` completes dictionary keys from member names. It now ignores array shaped synthetics, so `$hashtable['<Tab>` is unaffected.\n\nThe array type also carries the element members. That is what makes `$a,$b | Select-Object A | Select-Object <Tab>` work, because `InferTypesFromSelectCommand` reads the raw previous element type rather than the enumerated one. It mirrors `AddMembersByInferredTypesClrType`, which already unwraps arrays to surface element members for ordinary CLR arrays, and matches PowerShell's runtime member enumeration.\n\nNo public surface is involved: `AstTypeInference` and `PSSyntheticTypeName` are both `internal`.\n\n## Design question for reviewers: differently shaped elements\n\nI would like the Working Group's call on one behaviour before this leaves draft.\n\nElements that share a CLR type but not a shape, such as `[pscustomobject]@{A=1},[pscustomobject]@{B=2}`, currently fall back to a plain `PSObject[]` with no members. That preserves today's behaviour. The alternative is to union the members so that completion offers both `A` and `B`.\n\nReasons for the fallback, as implemented here:\n\n- Completion never suggests a member that only some elements have. `$_.B` on an element without `B` returns `$null` silently, and throws `PropertyNotFoundException` under `Set-StrictMode -Version 2`.\n- No tie-breaking rules are needed for conflicting member types (`@{A=1},@{A='x'}`) or conflicting `PSTypeName`s.\n\nReasons for the union:\n\n- All of these cases complete nothing today, so a superset is still more useful than silence.\n- `Select-Object A,B` over mixed objects is legal and emits `$null` for the elements that lack the property.\n\nThe merge decision is isolated in a single helper, `MergeArrayElementType`, so switching to the union (or putting it behind an experimental feature) is a small, contained change. Happy to do either.\n\n## Testing\n\nNew tests: 6 in `TypeInference.Tests.ps1`, 3 in `TabCompletion.Tests.ps1`, including regression guards for hashtable key completion and for mixed shapes.\n\nVerified by running both suites against two builds of this branch that differ only in `System.Management.Automation.dll`:\n\n| Suite | Without the fix | With the fix |\n| --- | --- | --- |\n| `TypeInference.Tests.ps1` | 231 passed, 5 failed | 236 passed, 0 failed |\n| `TabCompletion.Tests.ps1` | 813 passed, 10 failed | 815 passed, 8 failed |\n\nThe failures that disappear are exactly the new tests, so they do pin the behaviour. The remaining 8 tab completion failures are identical on both sides and are environmental on my machine (WSMan, remoting, CIM, missing `about_*` help and `PackageManagement`, and a CRLF sensitive tooltip test). No test that passed without the fix fails with it.\n\n## PR Checklist\n\n- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n  - Use the present tense and imperative mood when describing your changes\n- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n- [x] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n- [ ] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready to Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests).\n  - Opened as a draft pending the design question above.\n- **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**\n  - [x] None\n  - **OR**\n  - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.5/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)\n    - [ ] Experimental feature name(s):\n- **User-facing changes**\n  - [x] Not Applicable\n  - **OR**\n  - [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n    - [ ] Issue filed:\n- **Testing - New and feature**\n  - [ ] N/A or can only be tested interactively\n  - **OR**\n  - [x] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nhttps://claude.ai/code/session_01RCHTieSDkUEwp9srTVv74u\n","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27999/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27999/timeline","performed_via_github_app":null,"state_reason":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27998","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27998/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27998/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27998/events","html_url":"https://github.com/PowerShell/PowerShell/pull/27998","id":5403401942,"node_id":"PR_kwDOAvT7bc8AAAABC4VdbA","number":27998,"title":"Update preview changelog for v7.7.0-preview.5","user":{"login":"powershell-pr-automation[bot]","id":307760922,"node_id":"BOT_kgDOElgPGg","avatar_url":"https://avatars.githubusercontent.com/in/4359590?v=4","gravatar_id":"","url":"https://api.github.com/users/powershell-pr-automation%5Bbot%5D","html_url":"https://github.com/apps/powershell-pr-automation","followers_url":"https://api.github.com/users/powershell-pr-automation%5Bbot%5D/followers","following_url":"https://api.github.com/users/powershell-pr-automation%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/powershell-pr-automation%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/powershell-pr-automation%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/powershell-pr-automation%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/powershell-pr-automation%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/powershell-pr-automation%5Bbot%5D/repos","events_url":"https://api.github.com/users/powershell-pr-automation%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/powershell-pr-automation%5Bbot%5D/received_events","type":"Bot","user_view_type":"public","site_admin":false},"labels":[{"id":1126735745,"node_id":"MDU6TGFiZWwxMTI2NzM1NzQ1","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/CL-BuildPackaging","name":"CL-BuildPackaging","color":"fbca04","default":false,"description":"Indicates that a PR should be marked as a build or packaging change in the Change Log"}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-09-09T18:43:40Z","updated_at":"2026-09-09T22:58:04Z","closed_at":null,"assignee":null,"author_association":"CONTRIBUTOR","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/27998","html_url":"https://github.com/PowerShell/PowerShell/pull/27998","diff_url":"https://github.com/PowerShell/PowerShell/pull/27998.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/27998.patch","merged_at":null},"body":"Automated changelog update for v7.7.0-preview.5 (changes since v7.7.0-preview.4).\n\n## :warning: Changelog Validation Warnings\n\nThe following potential issues were found in `CHANGELOG/preview.md`. These do not block this PR — review and decide whether a follow-up edit to the changelog is needed.\n\n### Duplicate dependency bump entries\n\n- `actions/dependency-review-action` in: [7.7.0-preview.1], [7.7.0-preview.2]\n- `github/codeql-action` in: [7.7.0-preview.1], [7.7.0-preview.2]","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27998/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27998/timeline","performed_via_github_app":null,"state_reason":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27997","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27997/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27997/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27997/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27997","id":5402630783,"node_id":"I_kwDOAvT7bc8AAAABQgWafw","number":27997,"title":"PowerShell Core 6 ve PowerShell 7+","user":{"login":"asena1934-design","id":327111300,"node_id":"U_kgDOE39ShA","avatar_url":"https://avatars.githubusercontent.com/u/327111300?v=4","gravatar_id":"","url":"https://api.github.com/users/asena1934-design","html_url":"https://github.com/asena1934-design","followers_url":"https://api.github.com/users/asena1934-design/followers","following_url":"https://api.github.com/users/asena1934-design/following{/other_user}","gists_url":"https://api.github.com/users/asena1934-design/gists{/gist_id}","starred_url":"https://api.github.com/users/asena1934-design/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asena1934-design/subscriptions","organizations_url":"https://api.github.com/users/asena1934-design/orgs","repos_url":"https://api.github.com/users/asena1934-design/repos","events_url":"https://api.github.com/users/asena1934-design/events{/privacy}","received_events_url":"https://api.github.com/users/asena1934-design/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":2674564170,"node_id":"MDU6TGFiZWwyNjc0NTY0MTcw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Needs-Triage","name":"Needs-Triage","color":"CAD1A6","default":false,"description":"The issue is new and needs to be triaged by a work group."}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":3,"created_at":"2026-09-09T17:23:11Z","updated_at":"2026-09-09T21:53:37Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\nPowerShell Core 6 ve PowerShell 7+ sorunları giderme \n\n### Expected behavior\n\n```console\nPS> 2 + 2\n\n4\n```\n\n### Actual behavior\n\n```console\nPS> 2 + 2\n\n5\n```\n\n### Error details\n\n```console\nPS> Get-Error\n```\n\n### Environment data\n\n```powershell\nPS>PSVersionTable\n```\n\n### Visuals\n\n_No response_","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27997/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27997/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27994","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27994/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27994/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27994/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27994","id":5398250808,"node_id":"I_kwDOAvT7bc8AAAABQcLFOA","number":27994,"title":"OutGridView freezes indefinitely in 7.6.6","user":{"login":"SamLowryMOI","id":71798970,"node_id":"MDQ6VXNlcjcxNzk4OTcw","avatar_url":"https://avatars.githubusercontent.com/u/71798970?v=4","gravatar_id":"","url":"https://api.github.com/users/SamLowryMOI","html_url":"https://github.com/SamLowryMOI","followers_url":"https://api.github.com/users/SamLowryMOI/followers","following_url":"https://api.github.com/users/SamLowryMOI/following{/other_user}","gists_url":"https://api.github.com/users/SamLowryMOI/gists{/gist_id}","starred_url":"https://api.github.com/users/SamLowryMOI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamLowryMOI/subscriptions","organizations_url":"https://api.github.com/users/SamLowryMOI/orgs","repos_url":"https://api.github.com/users/SamLowryMOI/repos","events_url":"https://api.github.com/users/SamLowryMOI/events{/privacy}","received_events_url":"https://api.github.com/users/SamLowryMOI/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":2674564170,"node_id":"MDU6TGFiZWwyNjc0NTY0MTcw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Needs-Triage","name":"Needs-Triage","color":"CAD1A6","default":false,"description":"The issue is new and needs to be triaged by a work group."}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":0,"created_at":"2026-09-09T10:32:09Z","updated_at":"2026-09-09T10:33:10Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\nGet-Process | Out-GridView\n\n\n### Expected behavior\n\n```console\nOpening a GridView.\n```\n\n### Actual behavior\n\n```console\nHangs forever, worked in 7.6.5, works in 5.1.\n```\n\n### Error details\n\n```console\nHangs, so no output.\n```\n\n### Environment data\n\n```powershell\nName                           Value\n----                           -----\nPSVersion                      7.6.6\nPSEdition                      Core\nGitCommitId                    7.6.6\nOS                             Microsoft Windows 10.0.26200\nPlatform                       Win32NT\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\nPSRemotingProtocolVersion      2.4\nSerializationVersion           1.1.0.1\nWSManStackVersion              3.0\n```\n\n### Visuals\n\n_No response_","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27994/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27994/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27993","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27993/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27993/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27993/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27993","id":5397718296,"node_id":"I_kwDOAvT7bc8AAAABQbqlGA","number":27993,"title":"Regression: MSI UAC prompt identifies the app as “Microsoft” instead of “PowerShell”","user":{"login":"LAC-RTX","id":107055985,"node_id":"U_kgDOBmGLcQ","avatar_url":"https://avatars.githubusercontent.com/u/107055985?v=4","gravatar_id":"","url":"https://api.github.com/users/LAC-RTX","html_url":"https://github.com/LAC-RTX","followers_url":"https://api.github.com/users/LAC-RTX/followers","following_url":"https://api.github.com/users/LAC-RTX/following{/other_user}","gists_url":"https://api.github.com/users/LAC-RTX/gists{/gist_id}","starred_url":"https://api.github.com/users/LAC-RTX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LAC-RTX/subscriptions","organizations_url":"https://api.github.com/users/LAC-RTX/orgs","repos_url":"https://api.github.com/users/LAC-RTX/repos","events_url":"https://api.github.com/users/LAC-RTX/events{/privacy}","received_events_url":"https://api.github.com/users/LAC-RTX/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":2674564170,"node_id":"MDU6TGFiZWwyNjc0NTY0MTcw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Needs-Triage","name":"Needs-Triage","color":"CAD1A6","default":false,"description":"The issue is new and needs to be triaged by a work group."}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":0,"created_at":"2026-09-09T09:39:09Z","updated_at":"2026-09-09T09:39:09Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\n1. From a non-elevated Windows session, download the PowerShell 7.6.6 x64 MSI:\n\n     https://github.com/PowerShell/PowerShell/releases/download/v7.6.6/PowerShell-7.6.6-win-x64.msi\n\n  2. Launch PowerShell-7.6.6-win-x64.msi.\n\n  3. Observe the application name in the UAC consent prompt.\n\n  The same behavior occurs when the MSI is installed using:\n\n  winget install --id Microsoft.PowerShell --exact --source winget\n\n  This appears to be a regression of #5642, which reported the same class of problem and was fixed by #5650.\n\n  The MSI has the correct ProductName, \"PowerShell 7-x64\", but its Authenticode SpcSpOpusInfo signed attribute (OID 1.3.6.1.4.1.311.2.1.12) contains the program name \"Microsoft\". UAC uses t\n  hat signed description as the application name.\n\n### Expected behavior\n\n```console\nThe UAC consent prompt identifies the application as PowerShell, for example:\n\n  App: PowerShell 7\n  Verified publisher: Microsoft Corporation\n```\n\n### Actual behavior\n\n```console\nThe UAC consent prompt displays:\n\n  App: Microsoft\n  Verified publisher: Microsoft Corporation\n\n  The generic app name does not tell the user that PowerShell is requesting elevation.\n```\n\n### Error details\n\n```console\nNo PowerShell error is produced. This is incorrect identity information in the Windows UAC consent prompt.\n```\n\n### Environment data\n\n```powershell\nName                           Value\n  ----                           -----\n  PSVersion                      7.6.6\n  PSEdition                      Core\n  GitCommitId                    7.6.6\n  OS                             Microsoft Windows 10.0.26100\n  Platform                       Win32NT\n  PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\n  PSRemotingProtocolVersion      2.4\n  SerializationVersion           1.1.0.1\n  WSManStackVersion              3.0\n\n  Windows edition: Microsoft Windows 11 Enterprise\n  Windows build: 26100\n  Architecture: 64-bit\n  Installer: PowerShell-7.6.6-win-x64.msi\n```\n\n### Visuals\n\n_No response_","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27993/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27993/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27987","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27987/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27987/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27987/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27987","id":5390407057,"node_id":"I_kwDOAvT7bc8AAAABQUsVkQ","number":27987,"title":"LocProject.Tests.ps1 fails on master: PDP.xml entry violates OutputPath/CopyOption assertions and inflates LocItems count","user":{"login":"MariusStorhaug","id":17722253,"node_id":"MDQ6VXNlcjE3NzIyMjUz","avatar_url":"https://avatars.githubusercontent.com/u/17722253?v=4","gravatar_id":"","url":"https://api.github.com/users/MariusStorhaug","html_url":"https://github.com/MariusStorhaug","followers_url":"https://api.github.com/users/MariusStorhaug/followers","following_url":"https://api.github.com/users/MariusStorhaug/following{/other_user}","gists_url":"https://api.github.com/users/MariusStorhaug/gists{/gist_id}","starred_url":"https://api.github.com/users/MariusStorhaug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MariusStorhaug/subscriptions","organizations_url":"https://api.github.com/users/MariusStorhaug/orgs","repos_url":"https://api.github.com/users/MariusStorhaug/repos","events_url":"https://api.github.com/users/MariusStorhaug/events{/privacy}","received_events_url":"https://api.github.com/users/MariusStorhaug/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-09-08T18:23:59Z","updated_at":"2026-09-09T03:16:38Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the latest released version\n- [x] Search the existing issues.\n- [x] Refer to the FAQ.\n- [x] Refer to Differences between Windows PowerShell 5.1 and PowerShell.\n\n### Steps to reproduce\n\nBoth tests in `test/powershell/engine/ResourceValidation/LocProject.Tests.ps1` fail on a clean `master` checkout with no other changes applied. This surfaces as a `Unelevated CI` failure on Windows, Linux, and macOS, which in turn fails the `ready to merge / all jobs passed` gate for unrelated PRs.\n\nReproduced at `b664c2e026d1610e9b5a6cc5b14d3c86aae9ab81` (\"Add `PDP.xml` to the `LocProject.json` file for localization\", #27966):\n\n```powershell\ngit clone https://github.com/PowerShell/PowerShell.git\ncd PowerShell\nImport-Module ./build.psm1\nStart-PSBuild\nStart-PSPester -Path test/powershell/engine/ResourceValidation/LocProject.Tests.ps1\n```\n\nThe `Localize/LocProject.json` entry added in #27966 is the only entry that violates the test's assertions:\n\n```json\n{\n  \"SourceFile\": \".pipelines\\\\store\\\\PDPs\\\\PDP\\\\en-US\\\\PDP.xml\",\n  \"OutputPath\": \".pipelines\\\\store\\\\PDPs\\\\PDP\\\\\",\n  \"CopyOption\": \"LangIDOnPath\"\n}\n```\n\nThere are two independent problems:\n\n1. **`OutputPath` and `CopyOption` mismatch.** The test derives the expected `OutputPath` as the direct parent of `SourceFile` (`...\\PDP\\en-US\\`) and requires `CopyOption` to be `LangIDOnPathAndName`. This entry sets the grandparent (`...\\PDP\\`) and `LangIDOnPath`. Note the second assertion is currently masked, because the test fails on `OutputPath` first.\n\n2. **Resource count mismatch.** `Validate total resource count` compares `LocItems.Count` against the number of `*.resx` files in `resources` directories under `src`. `PDP.xml` is not a `.resx` file under `src`, but it is counted in `LocItems`, so the totals differ by exactly one (151 vs 150).\n\nI verified that only this one entry is affected — the other 150 entries satisfy all three assertions.\n\n### Expected behavior\n\n```console\nDescribing LocProject.json file validation\n  [+] Validate LocItems in LocProject.json\n  [+] Validate total resource count\n\nTests Passed: 2, Failed: 0\n```\n\n### Actual behavior\n\n```console\nDescribing LocProject.json file validation\n  [-] Validate LocItems in LocProject.json 259ms\n    Expected strings to be the same, but they were different.\n    Expected length: 32\n    Actual length:   26\n    Strings differ at index 26.\n    Expected: '.pipelines\\store\\PDPs\\PDP\\en-US\\'\n    But was:  '.pipelines\\store\\PDPs\\PDP\\'\n    32:                 $_.OutputPath | Should -BeExactly \"$parentDir\\\"\n    at <ScriptBlock>, /home/runner/work/PowerShell/PowerShell/test/powershell/engine/ResourceValidation/LocProject.Tests.ps1: line 32\n\n  [-] Validate total resource count 99ms\n    Expected 150, but got 151.\n    51:             $project.LocItems.Count | Should -Be $totalResourceCount\n    at <ScriptBlock>, /home/runner/work/PowerShell/PowerShell/test/powershell/engine/ResourceValidation/LocProject.Tests.ps1: line 51\n\nTests Passed: 0, Failed: 2\n```\n\n### Environment data\n\n```powershell\nName                           Value\n----                           -----\nPSVersion                      7.7.0-preview.4\nGitCommitId                    7.7.0-preview.4\nOS                             Darwin 24.6.0 (arm64)\nPlatform                       Unix\n\nRepro commit: b664c2e026d1610e9b5a6cc5b14d3c86aae9ab81 (master)\nAlso observed in CI on windows-latest, ubuntu-latest, and macos-latest.\n```\n\n### Visuals\n\nNot applicable.\n\n### Additional context\n\nThe localization metadata for `PDP.xml` may well be intentional, since it is a Store PDP file rather than a managed `.resx` resource. If so, the fix likely belongs in the test rather than in `LocProject.json`: the assertions currently encode a `src/**/resources/*.resx`-only assumption in both the `OutputPath`/`CopyOption` checks and the resource-count comparison, and would need to accommodate non-`.resx` localization entries outside `src`.\n\nFound while working on #27387, which touches no localization or pipeline files.","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27987/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27987/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27986","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27986/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27986/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27986/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27986","id":5390196994,"node_id":"I_kwDOAvT7bc8AAAABQUfhAg","number":27986,"title":"Hyper-V: Remove-VMDvdDrive followed by Add-VMHardDiskDrive results in error","user":{"login":"AngrySvarog","id":3493648,"node_id":"MDQ6VXNlcjM0OTM2NDg=","avatar_url":"https://avatars.githubusercontent.com/u/3493648?v=4","gravatar_id":"","url":"https://api.github.com/users/AngrySvarog","html_url":"https://github.com/AngrySvarog","followers_url":"https://api.github.com/users/AngrySvarog/followers","following_url":"https://api.github.com/users/AngrySvarog/following{/other_user}","gists_url":"https://api.github.com/users/AngrySvarog/gists{/gist_id}","starred_url":"https://api.github.com/users/AngrySvarog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AngrySvarog/subscriptions","organizations_url":"https://api.github.com/users/AngrySvarog/orgs","repos_url":"https://api.github.com/users/AngrySvarog/repos","events_url":"https://api.github.com/users/AngrySvarog/events{/privacy}","received_events_url":"https://api.github.com/users/AngrySvarog/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":2674564170,"node_id":"MDU6TGFiZWwyNjc0NTY0MTcw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Needs-Triage","name":"Needs-Triage","color":"CAD1A6","default":false,"description":"The issue is new and needs to be triaged by a work group."}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-09-08T18:02:16Z","updated_at":"2026-09-08T21:49:32Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\nI have an script to automate setting up a HyperV vm. At some point, I want to removed the installation media (DVD) and replace it with a 2nd VHD.\n\n1. Stop-VM\n2. If there is a DvdDrive, Remove-VMDvdDrive \n3. Add-VMHardDiskDrive \n\nResults : \"Unable to cast object of type 'Microsoft.HyperV.PowerShell.DvdDrive' to type 'Microsoft.HyperV.PowerShell.HardDiskDrive'.\"\n\nNote: re-running the script succeeds.\nSpeculation: internal state still thinks that the second \"drive\" is a DvdDrive, but it is actually gone. Re-run starts with new state and so succeeds.\n\n### Expected behavior\n\n```console\nAble to add Add-VMHardDiskDrive after Remove-VMDvdDrive\n```\n\n### Actual behavior\n\n```console\nError: Unable to cast object of type 'Microsoft.HyperV.PowerShell.DvdDrive' to type 'Microsoft.HyperV.PowerShell.HardDiskDrive'.\n```\n\n### Error details\n\n```console\nType        : System.Management.Automation.ActionPreferenceStopException\nErrorRecord :\n    Exception             :\n        Type    : Microsoft.PowerShell.Commands.WriteErrorException\n        Message : Unable to cast object of type 'Microsoft.HyperV.PowerShell.DvdDrive' to type 'Microsoft.HyperV.PowerShell.HardDiskDrive'.\n```\n\n### Environment data\n\n```powershell\nName                           Value\n----                           -----\nPSVersion                      7.6.5\nPSEdition                      Core\nGitCommitId                    7.6.5\nOS                             Microsoft Windows 10.0.26200\nPlatform                       Win32NT\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\nPSRemotingProtocolVersion      2.4\nSerializationVersion           1.1.0.1\nWSManStackVersion              3.0\n```\n\n### Visuals\n\n_No response_","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27986/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27986/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27985","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27985/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27985/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27985/events","html_url":"https://github.com/PowerShell/PowerShell/pull/27985","id":5389934634,"node_id":"PR_kwDOAvT7bc8AAAABCthXSg","number":27985,"title":"Prevent the fallback temporary home directory from being tampered","user":{"login":"daxian-dbw","id":127450,"node_id":"MDQ6VXNlcjEyNzQ1MA==","avatar_url":"https://avatars.githubusercontent.com/u/127450?v=4","gravatar_id":"","url":"https://api.github.com/users/daxian-dbw","html_url":"https://github.com/daxian-dbw","followers_url":"https://api.github.com/users/daxian-dbw/followers","following_url":"https://api.github.com/users/daxian-dbw/following{/other_user}","gists_url":"https://api.github.com/users/daxian-dbw/gists{/gist_id}","starred_url":"https://api.github.com/users/daxian-dbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daxian-dbw/subscriptions","organizations_url":"https://api.github.com/users/daxian-dbw/orgs","repos_url":"https://api.github.com/users/daxian-dbw/repos","events_url":"https://api.github.com/users/daxian-dbw/events{/privacy}","received_events_url":"https://api.github.com/users/daxian-dbw/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":1126735368,"node_id":"MDU6TGFiZWwxMTI2NzM1MzY4","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/CL-General","name":"CL-General","color":"fbca04","default":false,"description":"Indicates that a PR should be marked as a general cmdlet change in the Change Log"}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":2,"created_at":"2026-09-08T17:33:05Z","updated_at":"2026-09-09T16:18:53Z","closed_at":null,"assignee":null,"author_association":"MEMBER","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/27985","html_url":"https://github.com/PowerShell/PowerShell/pull/27985","diff_url":"https://github.com/PowerShell/PowerShell/pull/27985.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/27985.patch","merged_at":null},"body":"<!-- Anything that looks like this is a comment and can't be seen after the Pull Request is created. -->\r\n\r\n### PR Summary\r\n\r\nPrevent the home fallback directory from being tampered by a different local user, by checking the Unix permission mode of the temporary home directory -- PowerShell always creates the temporary home directory with the user-only permission, so if its mode is not what we expect, then it indicates the directory was tampered (e.g. a different local user created it) and we fail the startup for security reason.\r\n\r\n### PR Checklist\r\n\r\n- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n  - Use the present tense and imperative mood when describing your changes\r\n- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n- [ ] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n- [x] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready to Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests).\r\n- **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**\r\n  - [x] None\r\n  - **OR**\r\n  - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.5/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)\r\n    - [ ] Experimental feature name(s): <!-- Experimental feature name(s) here -->\r\n- **User-facing changes**\r\n  - [x] Not Applicable\r\n  - **OR**\r\n  - [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n    - [ ] Issue filed: <!-- Number/link of that issue here -->\r\n- **Testing - New and feature**\r\n  - [x] N/A or can only be tested interactively\r\n  - **OR**\r\n  - [ ] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)\r\n","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27985/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27985/timeline","performed_via_github_app":null,"state_reason":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27983","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27983/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27983/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27983/events","html_url":"https://github.com/PowerShell/PowerShell/pull/27983","id":5389491031,"node_id":"PR_kwDOAvT7bc8AAAABCtKlvg","number":27983,"title":"Localized file check-in by OneLocBuild Task: Build definition ID 13420: Build ID 2715250","user":{"login":"olprod","id":16075726,"node_id":"MDQ6VXNlcjE2MDc1NzI2","avatar_url":"https://avatars.githubusercontent.com/u/16075726?v=4","gravatar_id":"","url":"https://api.github.com/users/olprod","html_url":"https://github.com/olprod","followers_url":"https://api.github.com/users/olprod/followers","following_url":"https://api.github.com/users/olprod/following{/other_user}","gists_url":"https://api.github.com/users/olprod/gists{/gist_id}","starred_url":"https://api.github.com/users/olprod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olprod/subscriptions","organizations_url":"https://api.github.com/users/olprod/orgs","repos_url":"https://api.github.com/users/olprod/repos","events_url":"https://api.github.com/users/olprod/events{/privacy}","received_events_url":"https://api.github.com/users/olprod/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-09-08T16:45:53Z","updated_at":"2026-09-09T23:23:25Z","closed_at":null,"assignee":null,"author_association":"COLLABORATOR","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/27983","html_url":"https://github.com/PowerShell/PowerShell/pull/27983","diff_url":"https://github.com/PowerShell/PowerShell/pull/27983.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/27983.patch","merged_at":null},"body":"This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc.","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27983/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27983/timeline","performed_via_github_app":null,"state_reason":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27982","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27982/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27982/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27982/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27982","id":5386337529,"node_id":"I_kwDOAvT7bc8AAAABQQz8-Q","number":27982,"title":"Remote session (wsmprovhost.exe) cannot resolve assemblies due to PowerShellAssemblyLoadContext being initialized with empty basePaths","user":{"login":"mariuselix","id":9742060,"node_id":"MDQ6VXNlcjk3NDIwNjA=","avatar_url":"https://avatars.githubusercontent.com/u/9742060?v=4","gravatar_id":"","url":"https://api.github.com/users/mariuselix","html_url":"https://github.com/mariuselix","followers_url":"https://api.github.com/users/mariuselix/followers","following_url":"https://api.github.com/users/mariuselix/following{/other_user}","gists_url":"https://api.github.com/users/mariuselix/gists{/gist_id}","starred_url":"https://api.github.com/users/mariuselix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariuselix/subscriptions","organizations_url":"https://api.github.com/users/mariuselix/orgs","repos_url":"https://api.github.com/users/mariuselix/repos","events_url":"https://api.github.com/users/mariuselix/events{/privacy}","received_events_url":"https://api.github.com/users/mariuselix/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":2674564170,"node_id":"MDU6TGFiZWwyNjc0NTY0MTcw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Needs-Triage","name":"Needs-Triage","color":"CAD1A6","default":false,"description":"The issue is new and needs to be triaged by a work group."}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":0,"created_at":"2026-09-08T11:51:45Z","updated_at":"2026-09-08T12:16:29Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\nWhen running some PowerShell command that needs `System.IO.Pipelines` remotely (so via wsmprovhost.exe), it fails with a `FileNotFoundException`, because the file could not be located & loaded into the default ALC (Assembly Load Context). Of course, this could happen with other modules as well.\n\n**The file does exist & is in the right place, correct version.**\n\nThe problem seems to be that the ALC is initialized with `string.Empty` for `basePaths` and also specifically `System.IO.Pipelines` is missing from `TRUSTED_PLATFORM_ASSEMBLIES` list (raised a separate issue item for that -> https://github.com/PowerShell/PowerShell-Native/issues/114).\nhttps://github.com/PowerShell/PowerShell/blob/b664c2e026d1610e9b5a6cc5b14d3c86aae9ab81/src/System.Management.Automation/utils/ClrFacade.cs#L41\nhttps://github.com/PowerShell/PowerShell/blob/b664c2e026d1610e9b5a6cc5b14d3c86aae9ab81/src/System.Management.Automation/engine/hostifaces/ConnectionBase.cs#L46\nhttps://github.com/PowerShell/PowerShell/blob/b664c2e026d1610e9b5a6cc5b14d3c86aae9ab81/src/System.Management.Automation/CoreCLR/CorePsAssemblyLoadContext.cs#L589\n\ne.g:\n```powershell\nPS C:\\> Invoke-Command -ComputerName  srv-2025.skynet.lab -ConfigurationName powershell.7 -ScriptBlock {\n     \n     # We need to run something to trigger the loading of System.IO.Pipelines. Interacting with a repository using v3 APIs will trigger it while parsing the JSON (e.g: nuget.org).\n     Find-PSResource -Name Newtonsoft.Json -Repository NuGet -Verbose\n}\n\nFind-PSResource: Could not load file or assembly 'System.IO.Pipelines, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.\n```\n\nSome useful debugging information:\n```\n2068206b0e8(System.Management.Automation.PowerShellAssemblyLoadContext)._probingPaths\n[raw] 00000206820239d8 System.String[] Length: 0\n```\n\nRun this locally & remotely to confirm:\n```powershell\n[pscustomobject]@{\n    ProcessPath = [Environment]::ProcessPath\n    BaseDirectory = [AppContext]::BaseDirectory\n    DepsFiles = [AppContext]::GetData('APP_CONTEXT_DEPS_FILES')\n    HasPipelinesInTPA = (\n        [AppContext]::GetData('TRUSTED_PLATFORM_ASSEMBLIES') -split ';'\n    ).Where({ [IO.Path]::GetFileName($_) -eq 'System.IO.Pipelines.dll' }).Count -gt 0\n}\n```\n\nLOCAL:\n```powershell\nProcessPath : C:\\Program Files\\PowerShell\\7\\pwsh.exe \nBaseDirectory : C:\\Program Files\\PowerShell\\7\\\nDepsFile : C:\\Program Files\\PowerShell\\7\\pwsh.deps.json   \nHasPipelinesInTPA : True\n```\n\nREMOTE:\n```powershell\nProcessPath : C:\\Windows\\system32\\wsmprovhost.exe\nBaseDirectory :\nDepsFiles :\nHasPipelinesInTPA : False\nPSComputerName : srv-2025.skynet.lab\n```\n\nThis is the flow that leads to the problem:\n  -> `PSResourceGet `V3ServerAPICalls\n  -> `System.Text.Json` loaded to parse .json response\n  -> [PooledByteBufferWriter](https://relativityapiexplorer.azurewebsites.net/packages/System.Text.Json/10.0.11/lib/net10.0/System.Text.Json.dll/System.Text.Json/PooledByteBufferWriter?code=true) from `System.Text.Json` has a dependency (extends) on [PipeWriter](https://learn.microsoft.com/en-us/dotnet/api/system.io.pipelines.pipewriter?view=net-10.0), which is coming from `System.IO.Pipelines`\n  -> bind `System.IO.Pipelines` v10.0.0.0 — token cc7b13ffcd2ddd51\n  -> not in ALC already\n  -> empty `basePaths` / `__probingPaths`\n  -> not in `TRUSTED_PLATFORM_ASSEMBLIES`\n  -> fallback as last resort to legacy GAC / MSIL (not found there either, but not expected to be there anyway)\n  -> `FileNotFoundException`\n\nIf you manually import the module in the ALC, before running the command, it all works fine.\ne.g:\n```powershell\nInvoke-Command -ComputerName srv-2025.skynet.lab -ConfigurationName powershell.7 -ScriptBlock {\n \n     [System.Runtime.Loader.AssemblyLoadContext]::Default.LoadFromAssemblyPath((Join-Path $PSHOME 'System.IO.Pipelines.dll'))\n\n      # We need to run something to trigger the loading of System.IO.Pipelines. Interacting with a repository using v3 APIs will trigger it while parsing the JSON (e.g: nuget.org).\n      Find-PSResource -Name Newtonsoft.Json -Repository NuGetV3Lab\n}\n\n\nGAC    Version        Location                                         PSComputerName\n---    -------        --------                                         --------------\nFalse  v4.0.30319     C:\\Program Files\\PowerShell\\7\\System.IO.Pipelin… srv-2025.skynet.lab\n\nAuthor                   : James Newton-King\n...\nName                     : Newtonsoft.Json\nProjectUri               : https://www.newtonsoft.com/json\n...\n```\n\n\n### Expected behavior\n\nThe ALC loads System.IO.Pipelines & the command runs successfully.\n\n\n### Actual behavior\n\n```powershell\nFind-PSResource: Could not load file or assembly 'System.IO.Pipelines, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.\n```\n\n### Error details\n\n```console\nOriginInfo            :  srv-2025.skynet.lab\nException             :\n    Type                           : System.Management.Automation.RemoteException\n    SerializedRemoteException      : System.IO.FileNotFoundException: Could not load file or assembly\n'System.IO.Pipelines, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the\nfile specified.\n                                     File name: 'System.IO.Pipelines, Version=10.0.0.0, Culture=neutral,\nPublicKeyToken=cc7b13ffcd2ddd51'\n                                     at System.Text.Json.JsonDocument.Dispose()\n                                     at\nMicrosoft.PowerShell.PSResourceGet.Cmdlets.V3ServerAPICalls.GetJsonElementArr(String request, String propertyName,\nInt32& totalHits, ErrorRecord& errRecord) in C:\\__w\\1\\s\\PSResourceGet\\src\\code\\V3ServerAPICalls.cs:line 1528\n                                     at\nMicrosoft.PowerShell.PSResourceGet.Cmdlets.V3ServerAPICalls.GetJsonElementArr(String request, String propertyName,\nInt32& totalHits, ErrorRecord& errRecord) in C:\\__w\\1\\s\\PSResourceGet\\src\\code\\V3ServerAPICalls.cs:line 1498\n    SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfo\n    ErrorRecord                    :\n        Exception             :\n            Type                           : System.Management.Automation.RemoteException\n            SerializedRemoteException      : System.IO.FileNotFoundException: Could not load file or assembly\n'System.IO.Pipelines, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the\nfile specified.\n                                             File name: 'System.IO.Pipelines, Version=10.0.0.0, Culture=neutral,\nPublicKeyToken=cc7b13ffcd2ddd51'\n                                             at System.Text.Json.JsonDocument.Dispose()\n                                             at\nMicrosoft.PowerShell.PSResourceGet.Cmdlets.V3ServerAPICalls.GetJsonElementArr(String request, String propertyName,\nInt32& totalHits, ErrorRecord& errRecord) in C:\\__w\\1\\s\\PSResourceGet\\src\\code\\V3ServerAPICalls.cs:line 1528\n                                             at\nMicrosoft.PowerShell.PSResourceGet.Cmdlets.V3ServerAPICalls.GetJsonElementArr(String request, String propertyName,\nInt32& totalHits, ErrorRecord& errRecord) in C:\\__w\\1\\s\\PSResourceGet\\src\\code\\V3ServerAPICalls.cs:line 1498\n            SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfo\n            ErrorRecord                    :\n                Exception             :\n                    Type                           : System.Management.Automation.RemoteException\n                    SerializedRemoteException      : System.IO.FileNotFoundException: Could not load file or assembly\n'System.IO.Pipelines, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the\nfile specified.\n                                                     File name: 'System.IO.Pipelines, Version=10.0.0.0,\nCulture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'\n                                                     at System.Text.Json.JsonDocument.Dispose()\n                                                     at\nMicrosoft.PowerShell.PSResourceGet.Cmdlets.V3ServerAPICalls.GetJsonElementArr(String request, String propertyName,\nInt32& totalHits, ErrorRecord& errRecord) in C:\\__w\\1\\s\\PSResourceGet\\src\\code\\V3ServerAPICalls.cs:line 1528\n                                                     at\nMicrosoft.PowerShell.PSResourceGet.Cmdlets.V3ServerAPICalls.GetJsonElementArr(String request, String propertyName,\nInt32& totalHits, ErrorRecord& errRecord) in C:\\__w\\1\\s\\PSResourceGet\\src\\code\\V3ServerAPICalls.cs:line 1498\n                    SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfo\n                    ErrorRecord                    :\n                        Exception             :\n                            Type                           : System.Management.Automation.RemoteException\n                            SerializedRemoteException      : System.IO.FileNotFoundException: Could not load file or\nassembly 'System.IO.Pipelines, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot\nfind the file specified.\n                                                             File name: 'System.IO.Pipelines, Version=10.0.0.0,\nCulture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'\n                                                             at System.Text.Json.JsonDocument.Dispose()\n                                                             at\nMicrosoft.PowerShell.PSResourceGet.Cmdlets.V3ServerAPICalls.GetJsonElementArr(String request, String propertyName,\nInt32& totalHits, ErrorRecord& errRecord) in C:\\__w\\1\\s\\PSResourceGet\\src\\code\\V3ServerAPICalls.cs:line 1528\n                                                             at\nMicrosoft.PowerShell.PSResourceGet.Cmdlets.V3ServerAPICalls.GetJsonElementArr(String request, String propertyName,\nInt32& totalHits, ErrorRecord& errRecord) in C:\\__w\\1\\s\\PSResourceGet\\src\\code\\V3ServerAPICalls.cs:line 1498\n                            SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfo\n                            ErrorRecord                    :\n                                Exception             :\n                                    Type                           : System.Management.Automation.RemoteException\n                                    SerializedRemoteException      : System.IO.FileNotFoundException: Could not load\nfile or assembly 'System.IO.Pipelines, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system\ncannot find the file specified.\n                                                                     File name: 'System.IO.Pipelines,\nVersion=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'\n                                                                     at System.Text.Json.JsonDocument.Dispose()\n                                                                     at\nMicrosoft.PowerShell.PSResourceGet.Cmdlets.V3ServerAPICalls.GetJsonElementArr(String request, String propertyName,\nInt32& totalHits, ErrorRecord& errRecord) in C:\\__w\\1\\s\\PSResourceGet\\src\\code\\V3ServerAPICalls.cs:line 1528\n                                                                     at\nMicrosoft.PowerShell.PSResourceGet.Cmdlets.V3ServerAPICalls.GetJsonElementArr(String request, String propertyName,\nInt32& totalHits, ErrorRecord& errRecord) in C:\\__w\\1\\s\\PSResourceGet\\src\\code\\V3ServerAPICalls.cs:line 1498\n                                    SerializedRemoteInvocationInfo : System.Management.Automation.InvocationInfo\n                                    ErrorRecord                    : …\n                                    Message                        : Could not load file or assembly\n'System.IO.Pipelines, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the\nfile specified.\n                                    HResult                        : -2146233087\n                                TargetObject          : Microsoft.PowerShell.PSResourceGet.Cmdlets.V3ServerAPICalls\n                                CategoryInfo          : InvalidResult:\n(Microsoft.PowerShel…ts.V3ServerAPICalls:V3ServerAPICalls) [Find-PSResource], FileNotFoundException\n                                FullyQualifiedErrorId :\nGetResponsesFromRegistrationsResourceFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.FindPSResource\n                                ScriptStackTrace      : at <ScriptBlock>, <No file>: line 32\n                            Message                        : Could not load file or assembly 'System.IO.Pipelines,\nVersion=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.\n                            HResult                        : -2146233087\n                        TargetObject          : Microsoft.PowerShell.PSResourceGet.Cmdlets.V3ServerAPICalls\n                        CategoryInfo          : InvalidResult:\n(Microsoft.PowerShel…ts.V3ServerAPICalls:V3ServerAPICalls) [Find-PSResource], FileNotFoundException\n                        FullyQualifiedErrorId :\nGetResponsesFromRegistrationsResourceFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.FindPSResource\n                        ScriptStackTrace      : at <ScriptBlock>, <No file>: line 32\n                    Message                        : Could not load file or assembly 'System.IO.Pipelines,\nVersion=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.\n                    HResult                        : -2146233087\n                TargetObject          : Microsoft.PowerShell.PSResourceGet.Cmdlets.V3ServerAPICalls\n                CategoryInfo          : InvalidResult: (Microsoft.PowerShel…ts.V3ServerAPICalls:V3ServerAPICalls)\n[Find-PSResource], FileNotFoundException\n                FullyQualifiedErrorId :\nGetResponsesFromRegistrationsResourceFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.FindPSResource\n                ScriptStackTrace      : at <ScriptBlock>, <No file>: line 32\n            Message                        : Could not load file or assembly 'System.IO.Pipelines, Version=10.0.0.0,\nCulture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.\n            HResult                        : -2146233087\n        TargetObject          : Microsoft.PowerShell.PSResourceGet.Cmdlets.V3ServerAPICalls\n        CategoryInfo          : InvalidResult: (Microsoft.PowerShel…ts.V3ServerAPICalls:V3ServerAPICalls)\n[Find-PSResource], FileNotFoundException\n        FullyQualifiedErrorId :\nGetResponsesFromRegistrationsResourceFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.FindPSResource\n        ScriptStackTrace      : at <ScriptBlock>, <No file>: line 32\n    Message                        : Could not load file or assembly 'System.IO.Pipelines, Version=10.0.0.0,\nCulture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.\n    HResult                        : -2146233087\nTargetObject          : Microsoft.PowerShell.PSResourceGet.Cmdlets.V3ServerAPICalls\nCategoryInfo          : InvalidResult: (Microsoft.PowerShel…ts.V3ServerAPICalls:V3ServerAPICalls) [Find-PSResource],\nFileNotFoundException\nFullyQualifiedErrorId :\nGetResponsesFromRegistrationsResourceFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.FindPSResource\nScriptStackTrace      : at <ScriptBlock>, <No file>: line 32\n```\n\n### Environment data\n\n$PSVersionTable inserted in the ScriptBlock. I cannot test with PowerShell 7.7 preview, because it does not come with a pwrshplugin.dll & PSSessionConfiguration.\n\nNevertheless, the problematic code is present in the latest master branch.\n\n```powershell\nName                           Value\n----                           -----\nPlatform                       Win32NT\nPSRemotingProtocolVersion\nPSEdition                      Core\nOS                             Microsoft Windows 10.0.26100\nPSVersion                      7.6.5\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\nGitCommitId                    7.6.5\nWSManStackVersion              3.0\nSerializationVersion           1.1.0.1\n```\n\n### Visuals\n\nFailing:\n<img width=\"1054\" height=\"133\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/30570099-3377-45d9-9b6a-77b73f347439\" />\n\nWorking, if you manually load the module in the default ALC:\n<img width=\"1051\" height=\"291\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1063b7bf-593f-4adb-852d-23af7fa7d7d7\" />","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27982/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27982/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27981","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27981/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27981/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27981/events","html_url":"https://github.com/PowerShell/PowerShell/pull/27981","id":5366269840,"node_id":"PR_kwDOAvT7bc8AAAABCar7zA","number":27981,"title":"Strip rel-link authorization only across origins","user":{"login":"chris-peterson","id":1980791,"node_id":"MDQ6VXNlcjE5ODA3OTE=","avatar_url":"https://avatars.githubusercontent.com/u/1980791?v=4","gravatar_id":"","url":"https://api.github.com/users/chris-peterson","html_url":"https://github.com/chris-peterson","followers_url":"https://api.github.com/users/chris-peterson/followers","following_url":"https://api.github.com/users/chris-peterson/following{/other_user}","gists_url":"https://api.github.com/users/chris-peterson/gists{/gist_id}","starred_url":"https://api.github.com/users/chris-peterson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris-peterson/subscriptions","organizations_url":"https://api.github.com/users/chris-peterson/orgs","repos_url":"https://api.github.com/users/chris-peterson/repos","events_url":"https://api.github.com/users/chris-peterson/events{/privacy}","received_events_url":"https://api.github.com/users/chris-peterson/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":2,"created_at":"2026-09-06T16:37:46Z","updated_at":"2026-09-06T17:17:26Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/27981","html_url":"https://github.com/PowerShell/PowerShell/pull/27981","diff_url":"https://github.com/PowerShell/PowerShell/pull/27981.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/27981.patch","merged_at":null},"body":"# PR Summary\n\nFixes #27861.\n\n`-FollowRelLink` exists so `Invoke-RestMethod` can page an API that advertises its next page in a `Link` header — GitHub's and GitLab's paginated endpoints are the canonical case, and they want the caller's `Authorization` header on every page, not just the first. Since `91448ff15` the rel-link loop passes `isRedirect: followedRelLink > 0`, so `GetRequest` drops that header on every page after the first.\n\nAgainst a server that permits anonymous reads, that reads as truncation rather than an error: the unauthenticated follows still return 200, with a visibility-filtered result set. A GitLab group of 43 projects came back as 39 at every page size tried, reached through the `GitlabCli` module's `Get-GitlabProject -Recurse -All`, with no warning and no non-zero status.\n\n## PR Context\n\nA rel link is not a redirect. It is a client-initiated GET to a URL the *same server* advertised in its own `Link` header, so the credentials the caller supplied for that API still apply. Stripping on every hop removes them from the one case `-FollowRelLink` was added to serve.\n\nThis compares the followed link's scheme, host and port against the origin the caller requested and passes `isRedirect` only when they differ. Genuine 3xx redirects still strip unconditionally, and `-PreserveAuthorizationOnRedirect` still overrides both.\n\n**The test contract this changes.** `91448ff15` added five test cases; this contradicts exactly one, the rel-link one. WebListener generated every link from the request's own display URL, so nothing in that suite could reach a second origin — which is why *\"strips the authorization header on followed relation links\"* was only ever proven same-origin. The four `-PreserveHttpMethodOnRedirect` cases it added exercise the 3xx path, for both cmdlets, and are untouched.\n\n`master` is the target because 7.7 and later inherit from it. The same call site is live on `release/v7.4.20`, `release/v7.5.11`, `release/v7.6.6` and `release/v7.7.0-preview.5`, and shipped in v7.4.19, v7.5.10, v7.6.5 and v7.7.0-preview.4 — backports follow this.\n\n### Review guide\n\n**Start here — the fix.** [`WebRequestPSCmdlet.Common.cs`](https://github.com/PowerShell/PowerShell/pull/27981/changes#diff-9e8673bc737d91c9712fa4e7e5fef6aac6690999bcbd0777759563afd015c50dR574) is the origin comparison, and [the call it feeds](https://github.com/PowerShell/PowerShell/pull/27981/changes#diff-9e8673bc737d91c9712fa4e7e5fef6aac6690999bcbd0777759563afd015c50dR577) is the only behavior change in the product code. `Uri.Compare` with `UriComponents.SchemeAndServer` is the framework's own origin comparison, which normalizes a default port away rather than leaving that to string handling. Note that `requestedUri` is fixed at what the caller asked for, so every hop is measured against that rather than against the hop before it — a walk that leaves the origin stays unauthenticated for the rest of its pages.\n\n[`CheckProtocol(Uri)`](https://github.com/PowerShell/PowerShell/pull/27981/changes#diff-9e8673bc737d91c9712fa4e7e5fef6aac6690999bcbd0777759563afd015c50dR559) is load-bearing, not tidying: a `-Uri` given without a scheme parses as a *relative* URI, `Uri.Compare` then reports it as a mismatch against the absolute followed link, and the header would be stripped on every page. `GetRequest` applies the same normalization per request, so passing it on changes nothing about the request itself.\n\n**The contract change.** [`keeps the authorization header on relation links within the origin`](https://github.com/PowerShell/PowerShell/pull/27981/changes#diff-1b256250c40f42b7c01f2695c0c908112a4eead87e3ef3ff534768ad930e7ca1R3052) is `91448ff15`'s assertion inverted, now covering [both the scheme and scheme-less forms](https://github.com/PowerShell/PowerShell/pull/27981/changes#diff-1b256250c40f42b7c01f2695c0c908112a4eead87e3ef3ff534768ad930e7ca1R3055) of `-Uri` — the second case is what makes the normalization above provable. Two more cases pin the other side: [every page past a cross-origin link still strips](https://github.com/PowerShell/PowerShell/pull/27981/changes#diff-1b256250c40f42b7c01f2695c0c908112a4eead87e3ef3ff534768ad930e7ca1R3068), and [`-PreserveAuthorizationOnRedirect` still overrides across origins](https://github.com/PowerShell/PowerShell/pull/27981/changes#diff-1b256250c40f42b7c01f2695c0c908112a4eead87e3ef3ff534768ad930e7ca1R3084). Both cross-origin cases walk three pages, the last two served by the second origin, so they hold only while the comparison stays anchored to the requested origin.\n\n**Test-tool support.** [`LinkController.cs`](https://github.com/PowerShell/PowerShell/pull/27981/changes#diff-3d1d387df13351a7f117cfd212209f0cf6e280abefeecb961a1f7ae7e2c5dacaR83) takes a `nextorigin` query parameter so a `rel=\"next\"` can point at another listener port. Without it no case in this suite can leave its origin — the redirect tests included.\n\n## PR Checklist\n\n- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n  - Use the present tense and imperative mood when describing your changes\n- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n- [x] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n- [x] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready to Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests).\n- **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**\n  - [x] None\n    - Same-origin paging carried the header from 7.0 through v7.6.4; cross-origin links still strip.\n- **User-facing changes**\n  - [x] Not Applicable\n- **Testing - New and feature**\n  - [x] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)\n","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27981/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27981/timeline","performed_via_github_app":null,"state_reason":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27978","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27978/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27978/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27978/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27978","id":5353800655,"node_id":"I_kwDOAvT7bc8AAAABPxyDzw","number":27978,"title":"Running Start-PSBootstrap changes console defaults in conhost","user":{"login":"kilasuit","id":6355225,"node_id":"MDQ6VXNlcjYzNTUyMjU=","avatar_url":"https://avatars.githubusercontent.com/u/6355225?v=4","gravatar_id":"","url":"https://api.github.com/users/kilasuit","html_url":"https://github.com/kilasuit","followers_url":"https://api.github.com/users/kilasuit/followers","following_url":"https://api.github.com/users/kilasuit/following{/other_user}","gists_url":"https://api.github.com/users/kilasuit/gists{/gist_id}","starred_url":"https://api.github.com/users/kilasuit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kilasuit/subscriptions","organizations_url":"https://api.github.com/users/kilasuit/orgs","repos_url":"https://api.github.com/users/kilasuit/repos","events_url":"https://api.github.com/users/kilasuit/events{/privacy}","received_events_url":"https://api.github.com/users/kilasuit/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":311043048,"node_id":"MDU6TGFiZWwzMTEwNDMwNDg=","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Issue-Bug","name":"Issue-Bug","color":"fc2929","default":false,"description":"Issue has been identified as a bug in the product"},{"id":332202934,"node_id":"MDU6TGFiZWwzMzIyMDI5MzQ=","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/WG-Maintainers-Build","name":"WG-Maintainers-Build","color":"5319e7","default":false,"description":"specific to affecting the build"}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":4,"created_at":"2026-09-04T22:41:02Z","updated_at":"2026-09-06T05:44:57Z","closed_at":null,"assignee":null,"author_association":"COLLABORATOR","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\nWhen trying to do a local build in a PowerShell 7.6.5 session after running\n```powershell\nImport-Module .\\build.psm1\n```\nWhilst running `Start-PSBootstrap -Scenario All -Force` it gets into the `Install-DotNet` function and during this it ends up changing the console font & size as shown below, which is a jarring and unwanted experience. \n\nIt seems to b connected to the use of calling out to PowerShell.exe & `Start-NativeExecution` form initial stepping through the code\n\nhttps://github.com/PowerShell/PowerShell/blob/b664c2e026d1610e9b5a6cc5b14d3c86aae9ab81/build.psm1#L2807-L2838\n \n> Note: this does not occur in WinTerminal & is only seems to be in conhost (I've not tested elsewhere)\n\nAlso, annoyingly this doesn't happen every time I attempt a build either & this is the 2nd time I've dug into it for this to `resolve` whilst creating this issue.\n\nRaising for awareness as it's unlikely this will be fixed with it being in conhost only & not being easily repeatable either.\n\n\n### Expected behavior\n\n```console\nConsole doesn't change unnecessarily\n```\n\n### Actual behavior\n\n```console\nFonts change & other unwanted behaviours\n```\n\n### Error details\n\n```console\nN/A\n```\n\n### Environment data\n\n```powershell\nName                           Value\n----                           -----\nPSVersion                      7.6.5\nPSEdition                      Core\nGitCommitId                    7.6.5\nOS                             Microsoft Windows 10.0.26200\nPlatform                       Win32NT\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\nPSRemotingProtocolVersion      2.4\nSerializationVersion           1.1.0.1\nWSManStackVersion              3.0\n```\n\n### Visuals\n\nThis is how it comes out (with my profile)\n<img width=\"1377\" height=\"166\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/b71cbdc5-fc7c-4d14-b85c-8580dffe82a8\" />\n\n<img width=\"519\" height=\"592\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/8aa80848-6993-4403-97e0-bb5cc0d5c398\" />\n\nWhen the defaults are\n\n<img width=\"858\" height=\"142\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/65aadb32-87dc-4aff-82fe-b8e3855e9720\" />\n\n<img width=\"512\" height=\"586\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/372b03fe-cd9e-49a2-9e9a-31110b783c95\" />","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27978/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27978/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27977","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27977/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27977/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27977/events","html_url":"https://github.com/PowerShell/PowerShell/pull/27977","id":5351675904,"node_id":"PR_kwDOAvT7bc8AAAABCPjBsQ","number":27977,"title":"Cache the regex used by switch -regex","user":{"login":"AkshayDhola","id":171118842,"node_id":"U_kgDOCjMQ-g","avatar_url":"https://avatars.githubusercontent.com/u/171118842?v=4","gravatar_id":"","url":"https://api.github.com/users/AkshayDhola","html_url":"https://github.com/AkshayDhola","followers_url":"https://api.github.com/users/AkshayDhola/followers","following_url":"https://api.github.com/users/AkshayDhola/following{/other_user}","gists_url":"https://api.github.com/users/AkshayDhola/gists{/gist_id}","starred_url":"https://api.github.com/users/AkshayDhola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AkshayDhola/subscriptions","organizations_url":"https://api.github.com/users/AkshayDhola/orgs","repos_url":"https://api.github.com/users/AkshayDhola/repos","events_url":"https://api.github.com/users/AkshayDhola/events{/privacy}","received_events_url":"https://api.github.com/users/AkshayDhola/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":1126735368,"node_id":"MDU6TGFiZWwxMTI2NzM1MzY4","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/CL-General","name":"CL-General","color":"fbca04","default":false,"description":"Indicates that a PR should be marked as a general cmdlet change in the Change Log"}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":3,"created_at":"2026-09-04T18:28:33Z","updated_at":"2026-09-08T16:18:47Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/27977","html_url":"https://github.com/PowerShell/PowerShell/pull/27977","diff_url":"https://github.com/PowerShell/PowerShell/pull/27977.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/27977.patch","merged_at":null},"body":"<!-- Anything that looks like this is a comment and can't be seen after the Pull Request is created. -->\r\n\r\n# PR Summary\r\n\r\n`switch -regex` no longer rebuilds a `Regex` object for every line that matches, making\r\nregex switch statements substantially faster and much lighter on allocation.\r\n\r\n`SwitchOps.ConditionSatisfiedRegex` paired a static `Regex.Match` call with `new Regex(...)`\r\nso it could read the group names, on the assumption — stated in the code comment — that the\r\nconstructor would hit .NET's regex cache. Only the static `Regex` methods consult that cache,\r\nso every successful match paid a full pattern parse and matcher codegen. The guard did not\r\nhelp either, since `m.Groups.Count` is at least 1 for any successful match.\r\n\r\nThis routes the branch through `ParserOps.NewRegex`, the cache that `-match`, `-replace` and\r\n`-split` already use, and matches on that instance. The pattern and `RegexOptions` are\r\nunchanged, so matching semantics are identical, and the existing `catch (ArgumentException)`\r\nstill fires for invalid patterns.\r\n\r\nAlso adds `test/powershell/Language/Scripting/SwitchRegex.Tests.ps1`. `switch -regex` had no\r\ntest coverage anywhere under `test/powershell`.\r\n\r\nFix #27975\r\n\r\n## PR Context\r\n\r\n<!-- Provide a little reasoning as to why this Pull Request helps and why you have opened it. -->\r\nReported in #27975. Measured on a local Release build of `6ca24ccf0`, 200,000-line log,\r\nmedian of 5 runs, both binaries built the same way:\r\n\r\n| Scenario | Before | After | Change |\r\n| --- | ---: | ---: | ---: |\r\n| 1 clause, every line matches | 1144.0 ms | 305.3 ms | 3.7x |\r\n| 24 clauses, past `[regex]::CacheSize` | 21764.1 ms | 858.8 ms | 25.3x |\r\n| Allocation, 1 clause | 1008.6 MB | 250.3 MB | -75% |\r\n\r\nThe second row is a separate effect: because the old code went through the static cache,\r\nwhich holds only `Regex.CacheSize` (15) patterns, a switch with more distinct clause patterns\r\nthan that recompiled every clause for every line. Allocation is the most stable signal — it is\r\nidentical at 1008.6 MB on both the unpatched local build and the shipped 7.6.5 release.\r\n\r\nOne design point worth a reviewer's attention, also raised on the issue: clause patterns are\r\nnow retained in a process-wide cache of up to 1000 entries rather than the static cache's 15,\r\nand `[regex]::CacheSize` no longer influences `switch -regex`. That makes `switch` consistent\r\nwith the other regex operators, but it is a policy change rather than a pure optimization, so\r\nI would rather flag it than have it found in review.\r\n\r\nVerification: the new test file covers named and numbered groups, the exact `$matches` key\r\nset, `$matches` left untouched on a non-match, default case-insensitivity, `-CaseSensitive`, a\r\n`[regex]` instance as the clause condition under both switch modes, clause fallthrough, the\r\n`InvalidRegularExpression` error id, `switch -regex -file`, and 24 distinct clause patterns\r\nover repeated passes. It passes on both the patched and unpatched binary, since it asserts\r\nbehavior rather than speed. `test/powershell/Language` and `test/powershell/engine` (6764\r\ntests) show no regressions against an unpatched baseline build of the same commit.\r\n\r\nThe `condition as Regex` fast path in the same method is deliberately left untouched, so this\r\ndoes not interact with #8946.\r\n\r\n## PR Checklist\r\n\r\n- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n  - Use the present tense and imperative mood when describing your changes\r\n- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n- [ x] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n- [ ] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready to Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests).\r\n- **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**\r\n  - [x] None\r\n  - **OR**\r\n  - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.5/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)\r\n    - [ ] Experimental feature name(s): <!-- Experimental feature name(s) here -->\r\n- **User-facing changes**\r\n  - [x] Not Applicable\r\n  - **OR**\r\n  - [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n    - [ ] Issue filed: <!-- Number/link of that issue here -->\r\n- **Testing - New and feature**\r\n  - [x] N/A or can only be tested interactively\r\n  - **OR**\r\n  - [ ] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)\r\n","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27977/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27977/timeline","performed_via_github_app":null,"state_reason":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27976","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27976/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27976/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27976/events","html_url":"https://github.com/PowerShell/PowerShell/pull/27976","id":5351538656,"node_id":"PR_kwDOAvT7bc8AAAABCPbzvg","number":27976,"title":"Support macOS signatures in nonofficial pipelines","user":{"login":"jshigetomi","id":124807742,"node_id":"U_kgDOB3BqPg","avatar_url":"https://avatars.githubusercontent.com/u/124807742?v=4","gravatar_id":"","url":"https://api.github.com/users/jshigetomi","html_url":"https://github.com/jshigetomi","followers_url":"https://api.github.com/users/jshigetomi/followers","following_url":"https://api.github.com/users/jshigetomi/following{/other_user}","gists_url":"https://api.github.com/users/jshigetomi/gists{/gist_id}","starred_url":"https://api.github.com/users/jshigetomi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshigetomi/subscriptions","organizations_url":"https://api.github.com/users/jshigetomi/orgs","repos_url":"https://api.github.com/users/jshigetomi/repos","events_url":"https://api.github.com/users/jshigetomi/events{/privacy}","received_events_url":"https://api.github.com/users/jshigetomi/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":1126735745,"node_id":"MDU6TGFiZWwxMTI2NzM1NzQ1","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/CL-BuildPackaging","name":"CL-BuildPackaging","color":"fbca04","default":false,"description":"Indicates that a PR should be marked as a build or packaging change in the Change Log"},{"id":5901363025,"node_id":"LA_kwDOAvT7bc8AAAABX7-nUQ","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Backport-7.4.x-Consider","name":"Backport-7.4.x-Consider","color":"f9d0c4","default":false,"description":""},{"id":7440591206,"node_id":"LA_kwDOAvT7bc8AAAABu35pZg","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Backport-7.5.x-Consider","name":"Backport-7.5.x-Consider","color":"f9d0c4","default":false,"description":""},{"id":9514751507,"node_id":"LA_kwDOAvT7bc8AAAACNx-WEw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Backport-7.6.x-Consider","name":"Backport-7.6.x-Consider","color":"f9d0c4","default":false,"description":""}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-09-04T18:14:14Z","updated_at":"2026-09-04T22:28:26Z","closed_at":null,"assignee":null,"author_association":"COLLABORATOR","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/27976","html_url":"https://github.com/PowerShell/PowerShell/pull/27976","diff_url":"https://github.com/PowerShell/PowerShell/pull/27976.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/27976.patch","merged_at":null},"body":"<!-- Anything that looks like this is a comment and can't be seen after the Pull Request is created. -->\n\n# PR Summary\n\n<!-- Summarize your PR between here and the checklist. -->\n\n- Accept Microsoft Developer ID signatures or ad-hoc CodeDirectories when validating Mach-O output from nonofficial coordinated builds.\n- Repair binaries that fail native verification with an ad-hoc signature on macOS package agents, then require strict `codesign` verification before packaging.\n- Keep official builds verification-only and continue requiring the production Developer ID signature.\n\n## PR Context\n\n<!-- Provide a little reasoning as to why this Pull Request helps and why you have opened it. -->\n\nThe nonofficial signing service can return a universal `libpsl-native.dylib` with only one architecture slice signed. The coordinated Windows check found an ad-hoc CodeDirectory, but native macOS verification rejected the unsigned x86_64 slice. Nonofficial package jobs now repair only binaries that fail verification and then verify every Mach-O binary with `codesign --verify --deep --strict`.\n\nValidation:\n\n- [Coordinated nonofficial build 715578](https://dev.azure.com/mscodehub/PowerShellCore/_build/results?buildId=715578) succeeded for x64 and arm64 signature validation.\n- [Packages nonofficial run 715615](https://dev.azure.com/mscodehub/PowerShellCore/_build/results?buildId=715615) passed both x64 and arm64 macOS package jobs, including native strict signature verification.\n- The changed YAML and inline PowerShell parse successfully, PSScriptAnalyzer passes on the new helper, and local scenarios cover nonofficial repair and official verification-only behavior.\n\n## PR Checklist\n\n- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n  - Use the present tense and imperative mood when describing your changes\n- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n- [x] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n- [x] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready to Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests).\n- **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**\n  - [x] None\n  - **OR**\n  - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.5/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)\n    - [ ] Experimental feature name(s): <!-- Experimental feature name(s) here -->\n- **User-facing changes**\n  - [x] Not Applicable\n  - **OR**\n  - [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n    - [ ] Issue filed: <!-- Number/link of that issue here -->\n- **Testing - New and feature**\n  - [x] N/A or can only be tested interactively\n  - **OR**\n  - [ ] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)\n","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27976/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27976/timeline","performed_via_github_app":null,"state_reason":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27975","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27975/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27975/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27975/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27975","id":5351445179,"node_id":"I_kwDOAvT7bc8AAAABPviSuw","number":27975,"title":"switch -regex recompiles the clause pattern on every successful match","user":{"login":"AkshayDhola","id":171118842,"node_id":"U_kgDOCjMQ-g","avatar_url":"https://avatars.githubusercontent.com/u/171118842?v=4","gravatar_id":"","url":"https://api.github.com/users/AkshayDhola","html_url":"https://github.com/AkshayDhola","followers_url":"https://api.github.com/users/AkshayDhola/followers","following_url":"https://api.github.com/users/AkshayDhola/following{/other_user}","gists_url":"https://api.github.com/users/AkshayDhola/gists{/gist_id}","starred_url":"https://api.github.com/users/AkshayDhola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AkshayDhola/subscriptions","organizations_url":"https://api.github.com/users/AkshayDhola/orgs","repos_url":"https://api.github.com/users/AkshayDhola/repos","events_url":"https://api.github.com/users/AkshayDhola/events{/privacy}","received_events_url":"https://api.github.com/users/AkshayDhola/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":2674564170,"node_id":"MDU6TGFiZWwyNjc0NTY0MTcw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Needs-Triage","name":"Needs-Triage","color":"CAD1A6","default":false,"description":"The issue is new and needs to be triaged by a work group."}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-09-04T18:04:58Z","updated_at":"2026-09-04T18:08:14Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\n`switch -regex` builds a new `Regex` for every input object that matches, instead of reusing a\ncached one. The script below is self-contained and prints the numbers quoted under\n*Actual behavior*.\n\n```powershell\n# 1. Build a 200,000-line log.\n$log = Join-Path ([IO.Path]::GetTempPath()) 'switch-regex-bench.log'\nif (-not (Test-Path $log)) {\n    $sb = [System.Text.StringBuilder]::new()\n    for ($i = 1; $i -le 200000; $i++) {\n        $null = $sb.AppendLine(\"2026-09-04T00:00:0$($i % 10) ERROR thing $i failed\")\n    }\n    Set-Content -Path $log -Value $sb.ToString() -NoNewline\n}\n\nfunction Measure-Median ([scriptblock] $Action, [int] $Count = 5) {\n    $times = foreach ($i in 1..$Count) { (Measure-Command $Action).TotalMilliseconds }\n    ($times | Sort-Object)[[int]($Count / 2)]\n}\n\n# 2. Scenario A: one clause, every line matches.\n$a = Measure-Median {\n    switch -regex -file $log {\n        '^(?<ts>\\S+) ERROR (?<msg>.*)$' { $null = $matches }\n    }\n}\n\n# 3. Scenario B: 23 non-matching clauses ahead of the matching one, so 24 distinct\n#    patterns are evaluated per line -- more than [regex]::CacheSize, which is 15.\n$clauses = (1..23 | ForEach-Object { \"'NOMATCH{0:d2}(?<a>x)' {{ continue }}\" -f $_ }) -join \"`n    \"\n$b = Measure-Median ([scriptblock]::Create(@\"\nswitch -regex -file `$log {\n    $clauses\n    '^(?<ts>\\S+) ERROR (?<msg>.*)$' { `$null = `$matches }\n}\n\"@))\n\n# 4. Allocation cost of scenario A.\n[GC]::Collect(); [GC]::WaitForPendingFinalizers(); [GC]::Collect()\n$before = [GC]::GetTotalAllocatedBytes($true)\nswitch -regex -file $log { '^(?<ts>\\S+) ERROR (?<msg>.*)$' { $null = $matches } }\n$mb = ([GC]::GetTotalAllocatedBytes($true) - $before) / 1MB\n\n'Scenario A : {0:N1} ms  (1 clause, median of 5)'   -f $a\n'Scenario B : {0:N1} ms  (24 clauses, median of 5)' -f $b\n'Ratio B/A  : {0:N1}x'                             -f ($b / $a)\n'Allocated  : {0:N1} MB (scenario A)'               -f $mb\n```\n\n### Expected behavior\n\n```console\nEach distinct clause pattern compiles once and is reused, the way -match, -replace and -split\nalready behave. Adding clauses costs one extra match attempt per line, not a recompile, so\nscenario B stays a small multiple of scenario A.\n```\n\n### Actual behavior\n\n```console\nPowerShell 7.6.5, 200000 lines, median of 5 runs:\n\n  Scenario A (1 clause)    :   1690.4 ms\n  Scenario B (24 clauses)  :  22560.2 ms      13.3x, from clause count alone\n  Allocated, scenario A    :   1008.6 MB      about 5 KB per matched line\n\nEvery matching line constructs a fresh Regex. Once the clause count passes Regex.CacheSize (15),\nthe static cache thrashes and every clause recompiles for every line.\n```\n\n### Error details\n\n```console\n\n```\n\n### Environment data\n\n```powershell\nName                           Value\n----                           -----\nPSVersion                      7.6.5\nPSEdition                      Core\nGitCommitId                    7.6.5\nOS                             Arch Linux\nPlatform                       Unix\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\nPSRemotingProtocolVersion      2.4\nSerializationVersion           1.1.0.1\nWSManStackVersion              3.0\n```\n\n### Visuals\n\n_No response_","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27975/reactions","total_count":2,"+1":2,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27975/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27974","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27974/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27974/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27974/events","html_url":"https://github.com/PowerShell/PowerShell/pull/27974","id":5351144852,"node_id":"PR_kwDOAvT7bc8AAAABCPHesA","number":27974,"title":"Test-Json | Fix error message when schema file is not found","user":{"login":"kvprasoon","id":12897753,"node_id":"MDQ6VXNlcjEyODk3NzUz","avatar_url":"https://avatars.githubusercontent.com/u/12897753?v=4","gravatar_id":"","url":"https://api.github.com/users/kvprasoon","html_url":"https://github.com/kvprasoon","followers_url":"https://api.github.com/users/kvprasoon/followers","following_url":"https://api.github.com/users/kvprasoon/following{/other_user}","gists_url":"https://api.github.com/users/kvprasoon/gists{/gist_id}","starred_url":"https://api.github.com/users/kvprasoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvprasoon/subscriptions","organizations_url":"https://api.github.com/users/kvprasoon/orgs","repos_url":"https://api.github.com/users/kvprasoon/repos","events_url":"https://api.github.com/users/kvprasoon/events{/privacy}","received_events_url":"https://api.github.com/users/kvprasoon/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-09-04T17:30:35Z","updated_at":"2026-09-04T18:10:27Z","closed_at":null,"assignee":null,"author_association":"CONTRIBUTOR","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/27974","html_url":"https://github.com/PowerShell/PowerShell/pull/27974","diff_url":"https://github.com/PowerShell/PowerShell/pull/27974.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/27974.patch","merged_at":null},"body":"<!-- Anything that looks like this is a comment and can't be seen after the Pull Request is created. -->\r\n\r\n# PR Summary\r\n\r\n`Test-Json` returns incorrect error message when `SchemaFile` is not present.\r\n\r\n## PR Context\r\n\r\nThis PR has the changes to throw proper error message when the `SchemaFile` is not found.\r\n\r\n## PR Checklist\r\n\r\n- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n  - Use the present tense and imperative mood when describing your changes\r\n- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n- [x] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n- [x] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready to Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests).\r\n- **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**\r\n  - [x] None\r\n  - **OR**\r\n  - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.5/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)\r\n    - [ ] Experimental feature name(s): <!-- Experimental feature name(s) here -->\r\n- **User-facing changes**\r\n  - [x] Not Applicable\r\n  - **OR**\r\n  - [x] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n    - [x] Issue filed: #27973\r\n- **Testing - New and feature**\r\n  - [ ] N/A or can only be tested interactively\r\n  - **OR**\r\n  - [x] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)\r\n","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27974/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27974/timeline","performed_via_github_app":null,"state_reason":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27973","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27973/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27973/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27973/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27973","id":5350770159,"node_id":"I_kwDOAvT7bc8AAAABPu5F7w","number":27973,"title":"Test-Json returns wrong error when SchemaFile is not found","user":{"login":"kvprasoon","id":12897753,"node_id":"MDQ6VXNlcjEyODk3NzUz","avatar_url":"https://avatars.githubusercontent.com/u/12897753?v=4","gravatar_id":"","url":"https://api.github.com/users/kvprasoon","html_url":"https://github.com/kvprasoon","followers_url":"https://api.github.com/users/kvprasoon/followers","following_url":"https://api.github.com/users/kvprasoon/following{/other_user}","gists_url":"https://api.github.com/users/kvprasoon/gists{/gist_id}","starred_url":"https://api.github.com/users/kvprasoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvprasoon/subscriptions","organizations_url":"https://api.github.com/users/kvprasoon/orgs","repos_url":"https://api.github.com/users/kvprasoon/repos","events_url":"https://api.github.com/users/kvprasoon/events{/privacy}","received_events_url":"https://api.github.com/users/kvprasoon/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":2674564170,"node_id":"MDU6TGFiZWwyNjc0NTY0MTcw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Needs-Triage","name":"Needs-Triage","color":"CAD1A6","default":false,"description":"The issue is new and needs to be triaged by a work group."}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-09-04T16:49:33Z","updated_at":"2026-09-04T17:15:37Z","closed_at":null,"assignee":null,"author_association":"CONTRIBUTOR","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\nUse a valid json file `test.json` as shown in below example. Test its schema by passing an invalid schema file json.\n```\n> cat test.json\n{\n    \"str\": \"somestring\",\n    \"int\": 2026\n}\n\n>Test-Json -Path .\\test.json -SchemaFile .\\fooSchema.json\n```\n\n### Expected behavior\n\n```console\nTest-Json: Cannot find JSON schema file: C:\\Windows\\Temp\\fooSchema.json\n```\n\n### Actual behavior\n\n```console\n> Test-Json: Can not open JSON schema file: C:\\Windows\\Temp\\fooSchema.json\n```\n\n### Error details\n\n```console\nException             : \n    Type           : System.Exception\n    TargetSite     : \n        Name          : ThrowTerminatingError\n        DeclaringType : [System.Management.Automation.MshCommandRuntime]\n        MemberType    : Method\n        Module        : System.Management.Automation.dll\n    Message        : Can not open JSON schema file: C:\\Windows\\Temp\\fooSchema.json\n    InnerException : \n        Type       : System.IO.FileNotFoundException\n        Message    : Could not find file 'C:\\Windows\\Temp\\fooSchema.json'.\n        FileName   : C:\\Windows\\Temp\\fooSchema.json\n        TargetSite : \n            Name          : CreateFile\n            DeclaringType : [Microsoft.Win32.SafeHandles.SafeFileHandle]\n            MemberType    : Method\n            Module        : System.Private.CoreLib.dll\n        Source     : System.Private.CoreLib\n        HResult    : -2147024894\n        StackTrace : \n   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)\n   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)\n   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)\n   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)\n   at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Int32 bufferSize)\n   at System.IO.File.ReadAllText(String path, Encoding encoding)\n   at Json.Schema.JsonSchema.FromFile(String fileName)\n   at Microsoft.PowerShell.Commands.TestJsonCommand.BeginProcessing()\n    Source         : System.Management.Automation\n    HResult        : -2146233088\n    StackTrace     : \n   at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)\nTargetObject          : C:\\Windows\\Temp\\fooSchema.json\nCategoryInfo          : OpenError: (C:\\Windows\\Temp\\fooSchema.json:String) [Test-Json], Exception\nFullyQualifiedErrorId : JsonSchemaFileOpenFailure,Microsoft.PowerShell.Commands.TestJsonCommand\nInvocationInfo        : \n    MyCommand        : Test-Json\n    ScriptLineNumber : 1\n    OffsetInLine     : 1\n    HistoryId        : 1\n    Line             : Test-Json -Path .\\test.json -SchemaFile .\\fooSchema.json\n    Statement        : Test-Json -Path .\\test.json -SchemaFile .\\fooSchema.json\n    PositionMessage  : At line:1 char:1\n                       + Test-Json -Path .\\test.json -SchemaFile .\\fooSchema.json\n                       + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n    InvocationName   : Test-Json\n    CommandOrigin    : Internal\nScriptStackTrace      : at <ScriptBlock>, <No file>: line 1\n```\n\n### Environment data\n\n```powershell\n\n#Windows\nName                           Value\n----                           -----\nPSVersion                      7.6.5\nPSEdition                      Core\nGitCommitId                    7.6.5\nOS                             Microsoft Windows 10.0.26200\nPlatform                       Win32NT\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\nPSRemotingProtocolVersion      2.4\nSerializationVersion           1.1.0.1\nWSManStackVersion              3.0\n\n#Linux\nName                           Value\n----                           -----\nPSVersion                      7.4.2\nPSEdition                      Core\nGitCommitId                    7.4.2\nOS                             Ubuntu 20.04.6 LTS\nPlatform                       Unix\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\nPSRemotingProtocolVersion      2.3\nSerializationVersion           1.1.0.1\nWSManStackVersion              3.0\n```\n\n### Visuals\n\n_No response_","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27973/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27973/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27970","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27970/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27970/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27970/events","html_url":"https://github.com/PowerShell/PowerShell/pull/27970","id":5341655336,"node_id":"PR_kwDOAvT7bc8AAAABCHkbWw","number":27970,"title":"fix(engine): unwrap scalar PSObject during collection binding","user":{"login":"daksh-goyal","id":39990619,"node_id":"MDQ6VXNlcjM5OTkwNjE5","avatar_url":"https://avatars.githubusercontent.com/u/39990619?v=4","gravatar_id":"","url":"https://api.github.com/users/daksh-goyal","html_url":"https://github.com/daksh-goyal","followers_url":"https://api.github.com/users/daksh-goyal/followers","following_url":"https://api.github.com/users/daksh-goyal/following{/other_user}","gists_url":"https://api.github.com/users/daksh-goyal/gists{/gist_id}","starred_url":"https://api.github.com/users/daksh-goyal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daksh-goyal/subscriptions","organizations_url":"https://api.github.com/users/daksh-goyal/orgs","repos_url":"https://api.github.com/users/daksh-goyal/repos","events_url":"https://api.github.com/users/daksh-goyal/events{/privacy}","received_events_url":"https://api.github.com/users/daksh-goyal/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-09-03T21:28:44Z","updated_at":"2026-09-03T21:33:19Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/27970","html_url":"https://github.com/PowerShell/PowerShell/pull/27970","diff_url":"https://github.com/PowerShell/PowerShell/pull/27970.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/27970.patch","merged_at":null},"body":"# PR Summary\r\n\r\nUnwrap scalar values before adding them to collection parameters, matching the existing behavior for list elements. This prevents StringCollection parameters from attempting to cast a PSObject directly to a string.\r\n\r\nAdd regression coverage for a single pipeline-produced value.\r\n\r\n## PR Context\r\n\r\nfixes #27969 \r\n\r\n## PR Checklist\r\n\r\n- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n  - Use the present tense and imperative mood when describing your changes\r\n- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n- [x] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n- [x] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready to Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests).\r\n- **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**\r\n  - [x] None\r\n  - **OR**\r\n  - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.5/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)\r\n    - [ ] Experimental feature name(s): <!-- Experimental feature name(s) here -->\r\n- **User-facing changes**\r\n  - [x] Not Applicable\r\n  - **OR**\r\n  - [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n    - [] Issue filed: \r\n- **Testing - New and feature**\r\n  - [ ] N/A or can only be tested interactively\r\n  - **OR**\r\n  - [x] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)\r\n","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27970/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27970/timeline","performed_via_github_app":null,"state_reason":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27969","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27969/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27969/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27969/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27969","id":5341621500,"node_id":"I_kwDOAvT7bc8AAAABPmKs_A","number":27969,"title":"Binary cmdlet binding fails to unwrap a scalar PSObject for StringCollection parameters","user":{"login":"daksh-goyal","id":39990619,"node_id":"MDQ6VXNlcjM5OTkwNjE5","avatar_url":"https://avatars.githubusercontent.com/u/39990619?v=4","gravatar_id":"","url":"https://api.github.com/users/daksh-goyal","html_url":"https://github.com/daksh-goyal","followers_url":"https://api.github.com/users/daksh-goyal/followers","following_url":"https://api.github.com/users/daksh-goyal/following{/other_user}","gists_url":"https://api.github.com/users/daksh-goyal/gists{/gist_id}","starred_url":"https://api.github.com/users/daksh-goyal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daksh-goyal/subscriptions","organizations_url":"https://api.github.com/users/daksh-goyal/orgs","repos_url":"https://api.github.com/users/daksh-goyal/repos","events_url":"https://api.github.com/users/daksh-goyal/events{/privacy}","received_events_url":"https://api.github.com/users/daksh-goyal/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":401720735,"node_id":"MDU6TGFiZWw0MDE3MjA3MzU=","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/WG-Engine","name":"WG-Engine","color":"5319e7","default":false,"description":"core PowerShell engine, interpreter, and runtime"},{"id":2674564170,"node_id":"MDU6TGFiZWwyNjc0NTY0MTcw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Needs-Triage","name":"Needs-Triage","color":"CAD1A6","default":false,"description":"The issue is new and needs to be triaged by a work group."},{"id":5701254859,"node_id":"LA_kwDOAvT7bc8AAAABU9I-yw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/WG-NeedsReview","name":"WG-NeedsReview","color":"1d76db","default":false,"description":"Needs a review by the labeled Working Group"}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-09-03T21:24:39Z","updated_at":"2026-09-03T23:25:10Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\n```pwsh\n$source = @'\nusing System.Collections.Specialized;\nusing System.Management.Automation;\n\n[Cmdlet(\"Test\", \"StringCollectionBinding\")]\npublic sealed class TestStringCollectionBindingCommand : PSCmdlet\n{\n    [Parameter(Mandatory = true)]\n    public StringCollection Value { get; set; }\n\n    protected override void ProcessRecord()\n    {\n        WriteObject(Value[0]);\n    }\n}\n'@\n\n$type = Add-Type -TypeDefinition $source -PassThru\nImport-Module -Assembly $type.Assembly\n\n# Select-Object emits one scalar PSObject wrapping a string.\n$value = 'test-value' | Select-Object -Unique\n\n$value.GetType().FullName\n$value -is [System.Management.Automation.PSObject]\n\nTest-StringCollectionBinding -Value $value\n\n# The control case succeeds:\nTest-StringCollectionBinding -Value ([string[]]$value)\n\n# Multiple pipeline results also succeed:\n$values = 'first', 'second' | Select-Object -Unique\nTest-StringCollectionBinding -Value $values\n```\n\n### Expected behavior\n\n```console\nSystem.String\nTrue\ntest-value\n```\n\n### Actual behavior\n\n```console\nSystem.String\nTrue\n\nTest-StringCollectionBinding:\nCannot convert 'expected' to the type\n'System.Collections.Specialized.StringCollection' required by parameter\n'Value'. Unable to cast object of type\n'System.Management.Automation.PSObject' to type 'System.String'.\n```\n\n### Error details\n\n```console\nException             : \n    Type              : System.Management.Automation.ParameterBindingException\n    Message           : Cannot convert 'test-value' to the type 'System.Collections.Specialized.StringCollection' required by parameter 'Value'. Unable to cast object of type 'System.Management.Automation.PSObject' to type 'System.String'.\n    ParameterName     : Value\n    ParameterType     : [System.Collections.Specialized.StringCollection]\n    TypeSpecified     : [System.Management.Automation.PSObject]\n    ErrorId           : CannotConvertArgument\n    Line              : 22\n    Offset            : 37\n    CommandInvocation : \n        MyCommand        : Test-StringCollectionBinding\n        ScriptLineNumber : 22\n        OffsetInLine     : 1\n        HistoryId        : 1\n        Line             : Test-StringCollectionBinding -Value $value 2>$null\n\n        Statement        : Test-StringCollectionBinding -Value $value 2>$null\n        PositionMessage  : At line:22 char:1\n                           + Test-StringCollectionBinding -Value $value 2>$null\n                           + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n        InvocationName   : Test-StringCollectionBinding\n        PipelineLength   : 1\n        PipelinePosition : 1\n    ErrorRecord       : \n        Exception             : \n            Type    : System.Management.Automation.ParentContainsErrorRecordException\n            Message : Cannot convert 'test-value' to the type 'System.Collections.Specialized.StringCollection' required by parameter 'Value'. Unable to cast object of type 'System.Management.Automation.PSObject' to type 'System.String'.\n            HResult : -2146233087\n        CategoryInfo          : InvalidArgument: (:) [Test-StringCollectionBinding], ParentContainsErrorRecordException\n        FullyQualifiedErrorId : CannotConvertArgument,TestStringCollectionBindingCommand\n        InvocationInfo        : \n            MyCommand        : Test-StringCollectionBinding\n            ScriptLineNumber : 22\n            OffsetInLine     : 37\n            HistoryId        : 1\n            Line             : Test-StringCollectionBinding -Value $value 2>$null\n\n            Statement        : $value\n            PositionMessage  : At line:22 char:37\n                               + Test-StringCollectionBinding -Value $value 2>$null\n                               +                                     ~~~~~~\n            CommandOrigin    : Internal\n        ScriptStackTrace      : at <ScriptBlock>, <No file>: line 22\n    TargetSite        : \n        Name          : EncodeCollection\n        DeclaringType : [System.Management.Automation.ParameterBinderBase]\n        MemberType    : Method\n        Module        : System.Management.Automation.dll\n    Data              : \n        System.Management.Automation.Interpreter.InterpretedFrameInfo, System.Management.Automation, Version=7.6.0.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35 : <ScriptBlock>\n\n    InnerException    : \n        Type       : System.InvalidCastException\n        TargetSite : \n            Name          : ChkCastAny_NoCacheLookup\n            DeclaringType : [System.Runtime.CompilerServices.CastHelpers]\n            MemberType    : Method\n            Module        : System.Private.CoreLib.dll\n        Message    : Unable to cast object of type 'System.Management.Automation.PSObject' to type 'System.String'.\n        Source     : System.Private.CoreLib\n        HResult    : -2147467262\n        StackTrace : \n   at System.Collections.Specialized.StringCollection.System.Collections.IList.Add(Object value)\n   at System.Management.Automation.ParameterBinderBase.EncodeCollection(CommandParameterInternal argument, String parameterName, ParameterCollectionTypeInformation collectionTypeInformation, Type toType, Object currentValue, Boolean \ncoerceElementTypeIfNeeded, Boolean& coercionRequired)\n    Source            : System.Management.Automation\n    HResult           : -2146233087\n    StackTrace        : \n   at System.Management.Automation.ParameterBinderBase.EncodeCollection(CommandParameterInternal argument, String parameterName, ParameterCollectionTypeInformation collectionTypeInformation, Type toType, Object currentValue, Boolean \ncoerceElementTypeIfNeeded, Boolean& coercionRequired)\n   at System.Management.Automation.ParameterBinderBase.CoerceTypeAsNeeded(CommandParameterInternal argument, String parameterName, Type toType, ParameterCollectionTypeInformation collectionTypeInfo, Object currentValue)\n   at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)\n   at System.Management.Automation.CmdletParameterBinderController.BindParameter(CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)\n   at System.Management.Automation.CmdletParameterBinderController.BindParameter(UInt32 parameterSets, CommandParameterInternal argument, MergedCompiledCommandParameter parameter, ParameterBindingFlags flags)\n   at System.Management.Automation.CmdletParameterBinderController.BindNamedParameter(UInt32 parameterSets, CommandParameterInternal argument, MergedCompiledCommandParameter parameter)\n   at System.Management.Automation.ParameterBinderController.BindNamedParameters(UInt32 parameterSets, Collection`1 arguments)\n   at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)\n   at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)\n   at System.Management.Automation.CommandProcessor.BindCommandLineParameters()\n   at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)\n   at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)\n   at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)\n   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)\n--- End of stack trace from previous location ---\n   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)\n   at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext \nfuncContext)\n   at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)\n   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)\nCategoryInfo          : InvalidArgument: (:) [Test-StringCollectionBinding], ParameterBindingException\nFullyQualifiedErrorId : CannotConvertArgument,TestStringCollectionBindingCommand\nInvocationInfo        : \n    MyCommand        : Test-StringCollectionBinding\n    ScriptLineNumber : 22\n    OffsetInLine     : 37\n    HistoryId        : 1\n    Line             : Test-StringCollectionBinding -Value $value 2>$null\n\n    Statement        : $value\n    PositionMessage  : At line:22 char:37\n                       + Test-StringCollectionBinding -Value $value 2>$null\n                       +                                     ~~~~~~\n    CommandOrigin    : Internal\nScriptStackTrace      : at <ScriptBlock>, <No file>: line 22\n```\n\n### Environment data\n\n```powershell\nName                           Value\n----                           -----\nPSVersion                      7.6.5\nPSEdition                      Core\nGitCommitId                    7.6.5\nOS                             Microsoft Windows 10.0.26200\nPlatform                       Win32NT\nPSRemotingProtocolVersion      2.4\nSerializationVersion           1.1.0.1\nWSManStackVersion              3.0\n```\n\n### Visuals\n\n_No response_","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27969/reactions","total_count":1,"+1":1,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27969/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27968","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27968/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27968/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27968/events","html_url":"https://github.com/PowerShell/PowerShell/pull/27968","id":5339623509,"node_id":"PR_kwDOAvT7bc8AAAABCF8Fog","number":27968,"title":"Simplify Microsoft Store listing metadata","user":{"login":"jshigetomi","id":124807742,"node_id":"U_kgDOB3BqPg","avatar_url":"https://avatars.githubusercontent.com/u/124807742?v=4","gravatar_id":"","url":"https://api.github.com/users/jshigetomi","html_url":"https://github.com/jshigetomi","followers_url":"https://api.github.com/users/jshigetomi/followers","following_url":"https://api.github.com/users/jshigetomi/following{/other_user}","gists_url":"https://api.github.com/users/jshigetomi/gists{/gist_id}","starred_url":"https://api.github.com/users/jshigetomi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshigetomi/subscriptions","organizations_url":"https://api.github.com/users/jshigetomi/orgs","repos_url":"https://api.github.com/users/jshigetomi/repos","events_url":"https://api.github.com/users/jshigetomi/events{/privacy}","received_events_url":"https://api.github.com/users/jshigetomi/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":1126735745,"node_id":"MDU6TGFiZWwxMTI2NzM1NzQ1","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/CL-BuildPackaging","name":"CL-BuildPackaging","color":"fbca04","default":false,"description":"Indicates that a PR should be marked as a build or packaging change in the Change Log"},{"id":5901363025,"node_id":"LA_kwDOAvT7bc8AAAABX7-nUQ","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Backport-7.4.x-Consider","name":"Backport-7.4.x-Consider","color":"f9d0c4","default":false,"description":""},{"id":7440591206,"node_id":"LA_kwDOAvT7bc8AAAABu35pZg","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Backport-7.5.x-Consider","name":"Backport-7.5.x-Consider","color":"f9d0c4","default":false,"description":""},{"id":9514751507,"node_id":"LA_kwDOAvT7bc8AAAACNx-WEw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Backport-7.6.x-Consider","name":"Backport-7.6.x-Consider","color":"f9d0c4","default":false,"description":""}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":3,"created_at":"2026-09-03T17:38:28Z","updated_at":"2026-09-09T21:19:25Z","closed_at":null,"assignee":null,"author_association":"COLLABORATOR","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/27968","html_url":"https://github.com/PowerShell/PowerShell/pull/27968","diff_url":"https://github.com/PowerShell/PowerShell/pull/27968.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/27968.patch","merged_at":null},"body":"# PR Summary\n\nThe Store release pipeline currently keeps an empty PDP media tree and rewrites localized listing text at release time. This change makes the PDP the static source of Store listing language while limiting release-time changes to version-specific values.\n\n- Removes the PDP media elements, media configuration, and dedicated `PDP-Media` tree.\n- Defines release notes with `___VERSION___` and `___CHANGELOGLINK___`, then replaces only those placeholders during publishing.\n- Removes `AppStoreName` and its channel-specific mutation because the MSIX manifest already provides an `en-US` `DisplayName`.\n- Reuses the PDP root for StoreBroker v3's paired media-root input because that task requires both paths even when the PDP contains no media references.\n\n## PR Context\n\nKeeping localized release-note language in the PDP makes the listing easier to review and avoids modifying the description during release publishing. Removing `AppStoreName` also avoids a Store submission conflict for a language whose display name is already supplied by the package manifest.\n\n## PR Checklist\n\n- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n  - Use the present tense and imperative mood when describing your changes\n- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n- [x] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n- [ ] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready for Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-workflow/about-pull-requests#draft-pull-requests).\n- **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**\n  - [x] None\n  - **OR**\n  - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.5/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)\n    - [ ] Experimental feature name(s):\n- **User-facing changes**\n  - [x] Not Applicable\n  - **OR**\n  - [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n    - [ ] Issue filed:\n- **Testing - New and feature**\n  - [x] N/A or can only be tested interactively\n  - **OR**\n  - [ ] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27968/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27968/timeline","performed_via_github_app":null,"state_reason":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27967","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27967/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27967/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27967/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27967","id":5339589448,"node_id":"I_kwDOAvT7bc8AAAABPkOrSA","number":27967,"title":"Add Switch as to remove commented out properties from the New-ModuleManifest Cmdlet","user":{"login":"kilasuit","id":6355225,"node_id":"MDQ6VXNlcjYzNTUyMjU=","avatar_url":"https://avatars.githubusercontent.com/u/6355225?v=4","gravatar_id":"","url":"https://api.github.com/users/kilasuit","html_url":"https://github.com/kilasuit","followers_url":"https://api.github.com/users/kilasuit/followers","following_url":"https://api.github.com/users/kilasuit/following{/other_user}","gists_url":"https://api.github.com/users/kilasuit/gists{/gist_id}","starred_url":"https://api.github.com/users/kilasuit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kilasuit/subscriptions","organizations_url":"https://api.github.com/users/kilasuit/orgs","repos_url":"https://api.github.com/users/kilasuit/repos","events_url":"https://api.github.com/users/kilasuit/events{/privacy}","received_events_url":"https://api.github.com/users/kilasuit/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":311043050,"node_id":"MDU6TGFiZWwzMTEwNDMwNTA=","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Issue-Enhancement","name":"Issue-Enhancement","color":"fc2929","default":false,"description":"the issue is more of a feature request than a bug"},{"id":401720606,"node_id":"MDU6TGFiZWw0MDE3MjA2MDY=","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/WG-Cmdlets","name":"WG-Cmdlets","color":"5319e7","default":false,"description":"general cmdlet issues"},{"id":2674564170,"node_id":"MDU6TGFiZWwyNjc0NTY0MTcw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Needs-Triage","name":"Needs-Triage","color":"CAD1A6","default":false,"description":"The issue is new and needs to be triaged by a work group."},{"id":5701254859,"node_id":"LA_kwDOAvT7bc8AAAABU9I-yw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/WG-NeedsReview","name":"WG-NeedsReview","color":"1d76db","default":false,"description":"Needs a review by the labeled Working Group"}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-09-03T17:34:39Z","updated_at":"2026-09-05T06:00:03Z","closed_at":null,"assignee":null,"author_association":"COLLABORATOR","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Summary of the new feature / enhancement\n\nThis issue is for the following comment in #27946 that meets more of the communities request to have a minimised manifest that has no unused properties included.\n> As a separate issue, I feel we should look at how we further minimise the output from New-ModuleManifest to meet regular comments from the community around `unneeded/unnecessary` properties that form the Manifest from being included in the output, to help reduce needs for workarounds, likely via another switch along the lines of `NoCommentedProperties`.\n\n### Proposed technical implementation details (optional)\n\nAdd `-NoCommentedProperties` switch parameter to New-ModuleManifest cmdlet as to produce this layout of a module manifest, when called like this `New-ModuleManifest a1.psd1 -NoCommmentedProperties` so that you get the whole manifest shape like so.\n\n```powershell\n@{\nModuleVersion = '0.0.1'\nGUID = 'b02e941a-81c0-44cf-9ac1-2ed2a891eaeb'\nAuthor = 'RyanYates'\nCompanyName = 'Unknown'\nCopyright = '(c) RyanYates. All rights reserved.'\nFunctionsToExport = @()\nCmdletsToExport = @()\nVariablesToExport = '*'\nAliasesToExport = @()\nPrivateData = @{\n    PSData = @{\n        Prerelease = 'test'\n    }\n}\n}\n```","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27967/reactions","total_count":2,"+1":2,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27967/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27965","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27965/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27965/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27965/events","html_url":"https://github.com/PowerShell/PowerShell/pull/27965","id":5339005954,"node_id":"PR_kwDOAvT7bc8AAAABCFcasQ","number":27965,"title":"Replace the deprecated `X509Certificate2` constructor with `X509CertificateLoader.LoadCertificate`","user":{"login":"daxian-dbw","id":127450,"node_id":"MDQ6VXNlcjEyNzQ1MA==","avatar_url":"https://avatars.githubusercontent.com/u/127450?v=4","gravatar_id":"","url":"https://api.github.com/users/daxian-dbw","html_url":"https://github.com/daxian-dbw","followers_url":"https://api.github.com/users/daxian-dbw/followers","following_url":"https://api.github.com/users/daxian-dbw/following{/other_user}","gists_url":"https://api.github.com/users/daxian-dbw/gists{/gist_id}","starred_url":"https://api.github.com/users/daxian-dbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daxian-dbw/subscriptions","organizations_url":"https://api.github.com/users/daxian-dbw/orgs","repos_url":"https://api.github.com/users/daxian-dbw/repos","events_url":"https://api.github.com/users/daxian-dbw/events{/privacy}","received_events_url":"https://api.github.com/users/daxian-dbw/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":1126735368,"node_id":"MDU6TGFiZWwxMTI2NzM1MzY4","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/CL-General","name":"CL-General","color":"fbca04","default":false,"description":"Indicates that a PR should be marked as a general cmdlet change in the Change Log"}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":2,"created_at":"2026-09-03T16:31:29Z","updated_at":"2026-09-04T03:44:52Z","closed_at":null,"assignee":null,"author_association":"MEMBER","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/27965","html_url":"https://github.com/PowerShell/PowerShell/pull/27965","diff_url":"https://github.com/PowerShell/PowerShell/pull/27965.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/27965.patch","merged_at":null},"body":"### PR Summary\r\n\r\nReplace the deprecated `X509Certificate2` constructor with `X509CertificateLoader.LoadCertificate` in PowerShell.\r\n\r\n### PR Checklist\r\n\r\n- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n  - Use the present tense and imperative mood when describing your changes\r\n- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n- [ ] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n- [x] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready to Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests).\r\n- **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**\r\n  - [x] None\r\n  - **OR**\r\n  - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.5/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)\r\n    - [ ] Experimental feature name(s): <!-- Experimental feature name(s) here -->\r\n- **User-facing changes**\r\n  - [x] Not Applicable\r\n  - **OR**\r\n  - [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\r\n    - [ ] Issue filed: <!-- Number/link of that issue here -->\r\n- **Testing - New and feature**\r\n  - [x] N/A or can only be tested interactively\r\n  - **OR**\r\n  - [ ] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)\r\n","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27965/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27965/timeline","performed_via_github_app":null,"state_reason":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27947","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27947/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27947/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27947/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27947","id":5327167747,"node_id":"I_kwDOAvT7bc8AAAABPYYhAw","number":27947,"title":"Set-Content/Add-Content intermittently fail: \"Stream was not readable\" (GetContentWriterArgumentError) after IOException retry leaves write-only stream","user":{"login":"steve02081504","id":31927825,"node_id":"MDQ6VXNlcjMxOTI3ODI1","avatar_url":"https://avatars.githubusercontent.com/u/31927825?v=4","gravatar_id":"","url":"https://api.github.com/users/steve02081504","html_url":"https://github.com/steve02081504","followers_url":"https://api.github.com/users/steve02081504/followers","following_url":"https://api.github.com/users/steve02081504/following{/other_user}","gists_url":"https://api.github.com/users/steve02081504/gists{/gist_id}","starred_url":"https://api.github.com/users/steve02081504/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steve02081504/subscriptions","organizations_url":"https://api.github.com/users/steve02081504/orgs","repos_url":"https://api.github.com/users/steve02081504/repos","events_url":"https://api.github.com/users/steve02081504/events{/privacy}","received_events_url":"https://api.github.com/users/steve02081504/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-09-02T17:32:49Z","updated_at":"2026-09-02T17:32:56Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Summary\n\n`Set-Content` / `Add-Content` intermittently fail with:\n\n```\nSet-Content : Stream was not readable.\n+ CategoryInfo          : InvalidArgument: (<path>:String) [Set-Content], ArgumentException\n+ FullyQualifiedErrorId : GetContentWriterArgumentError,Microsoft.PowerShell.Commands.SetContentCommand\n```\n\nThis is a long-standing intermittent failure (reported by users for years, e.g. https://stackoverflow.com/q/48953767, https://stackoverflow.com/q/27370389), typically when the target file is momentarily contended by another process (a concurrent writer, an antivirus scan, a file watcher, OneDrive sync).\n\n### Repro / trigger\n\nHard to reproduce deterministically, but a reliable trigger is having two processes write the same (usually newly created) file with `Set-Content` concurrently, or writing a file that a file watcher / AV just opened. The error is non-deterministic but recurs under load.\n\n### Root cause\n\nIn `src/System.Management.Automation/namespaces/FileSystemContentStream.cs`, `FileSystemContentReaderWriter.CreateStreams`:\n\n1. When writing, it upgrades the requested access to `FileAccess.ReadWrite` so it can detect the encoding (`if ((fileAccess & FileAccess.Write) != 0) fileAccess = FileAccess.ReadWrite;`, ~line 838).\n2. The first `new FileStream(path, fileMode, fileAccess, fileShare)` (~line 853) throws `IOException` (e.g. sharing violation because another process holds the file), which is caught (~line 856) and retried with the original write-only `requestedAccess` (~line 866). That open succeeds.\n3. But the retry does **not** update the `fileAccess` variable. The reader construction below still checks the upgraded value: `if ((fileAccess & (FileAccess.Read)) != 0) { _reader = new StreamReader(_stream, fileEncoding); ... }` (~line 873). Since `fileAccess` still contains the `Read` bit while `_stream` is now a write-only `FileStream`, `new StreamReader(...)` throws `ArgumentException(\"Stream was not readable.\")`, which surfaces as `GetContentWriterArgumentError`.\n\nThe `StreamReader`/`StreamWriter` pair should only be created over a stream opened with the access the check is testing; after the `IOException` retry the reader decision must use `requestedAccess` (or the retry should reopen with `ReadWrite`/`FileShare` that is guaranteed to be readable).\n\n### Expected behavior\n\nA transient sharing violation during `Set-Content`/`Add-Content` should either fail with the real sharing-violation `IOException`, or be retried without leaving a write-only stream behind. It should never throw \"Stream was not readable.\" over a stream that is legitimately write-only.\n\n### Environment\n\n- PowerShell 7.6.5 (also observed on 5.1 and 7.x historically)\n- Windows 10/11, NTFS","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27947/reactions","total_count":1,"+1":1,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27947/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27946","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27946/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27946/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27946/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27946","id":5326158907,"node_id":"I_kwDOAvT7bc8AAAABPXa8Ow","number":27946,"title":"Add Switch as to remove descriptive comments from the New-ModuleManifest Cmdlet","user":{"login":"kilasuit","id":6355225,"node_id":"MDQ6VXNlcjYzNTUyMjU=","avatar_url":"https://avatars.githubusercontent.com/u/6355225?v=4","gravatar_id":"","url":"https://api.github.com/users/kilasuit","html_url":"https://github.com/kilasuit","followers_url":"https://api.github.com/users/kilasuit/followers","following_url":"https://api.github.com/users/kilasuit/following{/other_user}","gists_url":"https://api.github.com/users/kilasuit/gists{/gist_id}","starred_url":"https://api.github.com/users/kilasuit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kilasuit/subscriptions","organizations_url":"https://api.github.com/users/kilasuit/orgs","repos_url":"https://api.github.com/users/kilasuit/repos","events_url":"https://api.github.com/users/kilasuit/events{/privacy}","received_events_url":"https://api.github.com/users/kilasuit/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":311043050,"node_id":"MDU6TGFiZWwzMTEwNDMwNTA=","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Issue-Enhancement","name":"Issue-Enhancement","color":"fc2929","default":false,"description":"the issue is more of a feature request than a bug"},{"id":401720606,"node_id":"MDU6TGFiZWw0MDE3MjA2MDY=","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/WG-Cmdlets","name":"WG-Cmdlets","color":"5319e7","default":false,"description":"general cmdlet issues"},{"id":2674564170,"node_id":"MDU6TGFiZWwyNjc0NTY0MTcw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Needs-Triage","name":"Needs-Triage","color":"CAD1A6","default":false,"description":"The issue is new and needs to be triaged by a work group."},{"id":5701254859,"node_id":"LA_kwDOAvT7bc8AAAABU9I-yw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/WG-NeedsReview","name":"WG-NeedsReview","color":"1d76db","default":false,"description":"Needs a review by the labeled Working Group"}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":7,"created_at":"2026-09-02T15:54:22Z","updated_at":"2026-09-10T00:38:17Z","closed_at":null,"assignee":null,"author_association":"COLLABORATOR","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Summary of the new feature / enhancement\n\nAs mentioned in https://github.com/PowerShell/PowerShell/issues/2875#issuecomment-5497275482\n> Another solution would be to have an option to remove all the comments generated by [New-ModuleManifest](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/new-modulemanifest), then it would not be needed. One should not be hand editing module manifests, they should be generated to comply with the module import requirements..\n\nWe should look to add a switch that removes all **descriptive** comments as part of New-ModuleManifest cmdlet, whilst retaining any of the commented out properties that are a part of the Module Manifest definition.\n\n> As a separate issue, I feel we should look at how we further minimise the output from New-ModuleManifest to meet regular comments from the community around `unneeded/unnecessary` properties that form the Manifest from being included in the output, to help reduce needs for workarounds, likely via another switch along the lines of `NoCommentedProperties`.\n\nThe above comment however is out of scope for this particular issue at this time & should be discussed in another issue which I will raise shortly.\n\nWe however should determine whether we want this comment block that is created at the top of a manifest or not, my feeling is that for most people this would be a no.\n\n```powershell\n#\n# Module manifest for module 'c2'\n#\n# Generated by: Ryan Yates\n#\n# Generated on: Mon 31 08 2026\n#\n```\n\n### Proposed technical implementation details (optional)\n\nAdd `-NoComments` switch parameter to New-ModuleManifest cmdlet as to produce this layout of a module manifest, when called like this `New-ModuleManifest a1.psd1` so that you get the whole manifest shape like so.\n\n```powershell\n@{\n# RootModule = ''\nModuleVersion = '0.0.1'\n# CompatiblePSEditions = @()\nGUID = 'b02e941a-81c0-44cf-9ac1-2ed2a891eaeb'\nAuthor = 'RyanYates'\nCompanyName = 'Unknown'\nCopyright = '(c) RyanYates. All rights reserved.'\n# Description = ''\n# PowerShellVersion = ''\n# PowerShellHostName = ''\n# PowerShellHostVersion = ''\n# DotNetFrameworkVersion = ''\n# ClrVersion = ''\n# ProcessorArchitecture = ''\n# RequiredModules = @()\n# RequiredAssemblies = @()\n# ScriptsToProcess = @()\n# TypesToProcess = @()\n# FormatsToProcess = @()\n# NestedModules = @()\nFunctionsToExport = @()\nCmdletsToExport = @()\nVariablesToExport = '*'\nAliasesToExport = @()\n# DscResourcesToExport = @()\n# ModuleList = @()\n# FileList = @()\nPrivateData = @{\n    PSData = @{\n        # Tags = @()\n        # LicenseUri = ''\n        # ProjectUri = ''\n        # IconUri = ''\n        # ReleaseNotes = ''\n        Prerelease = 'test'\n        # RequireLicenseAcceptance = $false\n        # ExternalModuleDependencies = @()\n    }\n}\n# HelpInfoURI = ''\n# DefaultCommandPrefix = ''\n}\n```","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27946/reactions","total_count":7,"+1":7,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27946/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27907","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27907/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27907/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27907/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27907","id":5301738537,"node_id":"I_kwDOAvT7bc8AAAABPAIcKQ","number":27907,"title":"#requires -Modules fails in Enter-PSSession remoting session (PowerShell.7 endpoint) — regression from 7.4 to 7.6","user":{"login":"theJasonHelmick","id":12662278,"node_id":"MDQ6VXNlcjEyNjYyMjc4","avatar_url":"https://avatars.githubusercontent.com/u/12662278?v=4","gravatar_id":"","url":"https://api.github.com/users/theJasonHelmick","html_url":"https://github.com/theJasonHelmick","followers_url":"https://api.github.com/users/theJasonHelmick/followers","following_url":"https://api.github.com/users/theJasonHelmick/following{/other_user}","gists_url":"https://api.github.com/users/theJasonHelmick/gists{/gist_id}","starred_url":"https://api.github.com/users/theJasonHelmick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theJasonHelmick/subscriptions","organizations_url":"https://api.github.com/users/theJasonHelmick/orgs","repos_url":"https://api.github.com/users/theJasonHelmick/repos","events_url":"https://api.github.com/users/theJasonHelmick/events{/privacy}","received_events_url":"https://api.github.com/users/theJasonHelmick/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":2674564170,"node_id":"MDU6TGFiZWwyNjc0NTY0MTcw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Needs-Triage","name":"Needs-Triage","color":"CAD1A6","default":false,"description":"The issue is new and needs to be triaged by a work group."}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-08-31T15:10:54Z","updated_at":"2026-08-31T18:40:56Z","closed_at":null,"assignee":null,"author_association":"COLLABORATOR","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\nWhen running a script that contains a #requires -Modules statement inside a Enter-PSSession session configured with the PowerShell.7 endpoint, the script fails with a missing module error in PS 7.6. The same script ran correctly in PS 7.4. The module is present and loadable — removing #requires and running the script succeeds.\n\n# 1. Open a remote session\nEnter-PSSession -ComputerName <hostname> -Credential (Get-Credential) -ConfigurationName 'PowerShell.7'\n\n# 2. Run a script that contains:\n#requires -Modules ActiveDirectory\n\n# 3. Invoke it\n& .\\test.ps1\n\n### Expected behavior\n\n```console\nScript runs as it did in PS 7.4.\n```\n\n### Actual behavior\n\n```console\nThe script 'test.ps1' cannot be run because the following modules that are specified by the\n\"#requires\" statements of the script are missing: The module 'ActiveDirectory' cannot be found.\n```\n\n### Error details\n\n```console\nWorkaround\n\nRemove the #requires -Modules ActiveDirectory line, run the script once (it succeeds), then restore the line — it now works for the remainder of the session.\n\nEnvironment\n\nBroken: PowerShell 7.6\nWorking: PowerShell 7.4\nPlatform: Windows, remoting session via PowerShell.7 configuration endpoint\n\n\nThe ActiveDirectory module is a Windows PowerShell compatibility module (loaded via the implicit remoting shim in PS7). The #requires pre-flight check appears to fail to locate it through the compatibility path in 7.6 — but the module itself loads fine when #requires is bypassed, confirming it is present.\n\nRelated closed issues (no resolution): #16167, #17052\n```\n\n### Environment data\n\n```powershell\nPS 7.2 and 7.4\n```\n\n### Visuals\n\n_No response_","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27907/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27907/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27905","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27905/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27905/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27905/events","html_url":"https://github.com/PowerShell/PowerShell/pull/27905","id":5298589184,"node_id":"PR_kwDOAvT7bc8AAAABBlG23g","number":27905,"title":"Fix `Test-Connection` to report `BufferSize` 0 correctly","user":{"login":"malinfossum","id":238682761,"node_id":"U_kgDODjoCiQ","avatar_url":"https://avatars.githubusercontent.com/u/238682761?v=4","gravatar_id":"","url":"https://api.github.com/users/malinfossum","html_url":"https://github.com/malinfossum","followers_url":"https://api.github.com/users/malinfossum/followers","following_url":"https://api.github.com/users/malinfossum/following{/other_user}","gists_url":"https://api.github.com/users/malinfossum/gists{/gist_id}","starred_url":"https://api.github.com/users/malinfossum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malinfossum/subscriptions","organizations_url":"https://api.github.com/users/malinfossum/orgs","repos_url":"https://api.github.com/users/malinfossum/repos","events_url":"https://api.github.com/users/malinfossum/events{/privacy}","received_events_url":"https://api.github.com/users/malinfossum/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-08-31T09:26:13Z","updated_at":"2026-09-04T06:54:50Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/27905","html_url":"https://github.com/PowerShell/PowerShell/pull/27905","diff_url":"https://github.com/PowerShell/PowerShell/pull/27905.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/27905.patch","merged_at":null},"body":"# PR Summary\n\n`Test-Connection -BufferSize 0` reported `BufferSize` as 32 even though a 0-byte payload is sent.\n\nSince #20369 the default send buffer is intentionally empty (sending a custom buffer requires privileges on Unix), so the reporting fallback `buffer.Length == 0 ? DefaultSendBufferSize : buffer.Length` could not distinguish an explicit `-BufferSize 0` from the default. Both report sites (ping and traceroute) now report the requested `BufferSize` parameter instead:\n\n- `-BufferSize 0` → 0 (fixed)\n- default → 32 (unchanged)\n- `-BufferSize n` → n (unchanged)\n\nTests added for the explicit-0 and default cases; the full `Test-Connection` Pester suite passes locally on Windows (28 passed, 0 failed, 5 pending).\n\n`GetSendBuffer(0)` now returns the shared empty buffer as well. .NET's ping-utility fallback (unelevated Unix) rejects any buffer instance other than its default or `Array.Empty`, so `-BufferSize 0` used to throw `PlatformNotSupportedException` there; it now behaves like the default ping. That also lets the two new tests live in a Describe without `RequireSudoOnUnix`, so they run in the unelevated Linux/macOS passes too.\n\nNote for reviewers: on Windows a default ping actually sends a 0-byte payload (the empty default buffer is passed through to `Ping.Send`; `Reply.Buffer.Length` is 0) while reporting 32. That is pre-existing behavior from #20369 and unchanged here — happy to file a separate issue if the working group wants to revisit it.\n\nSupersedes #27657, which appears stalled on the CLA since July — credit to @raman118 for the earlier attempt.\n\n## PR Context\n\nFixes #27656\n\n## PR Checklist\n\n- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)\n- [x] Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header\n- [x] This PR is ready to merge and is not [Work in Progress](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---work-in-progress)\n","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27905/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27905/timeline","performed_via_github_app":null,"state_reason":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27904","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27904/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27904/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27904/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27904","id":5290345339,"node_id":"I_kwDOAvT7bc8AAAABO1RDew","number":27904,"title":"`powershell-lts` package is unavailable on new supported distributions (Debian 13 and RHEL 10)","user":{"login":"jakauppila","id":4100127,"node_id":"MDQ6VXNlcjQxMDAxMjc=","avatar_url":"https://avatars.githubusercontent.com/u/4100127?v=4","gravatar_id":"","url":"https://api.github.com/users/jakauppila","html_url":"https://github.com/jakauppila","followers_url":"https://api.github.com/users/jakauppila/followers","following_url":"https://api.github.com/users/jakauppila/following{/other_user}","gists_url":"https://api.github.com/users/jakauppila/gists{/gist_id}","starred_url":"https://api.github.com/users/jakauppila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakauppila/subscriptions","organizations_url":"https://api.github.com/users/jakauppila/orgs","repos_url":"https://api.github.com/users/jakauppila/repos","events_url":"https://api.github.com/users/jakauppila/events{/privacy}","received_events_url":"https://api.github.com/users/jakauppila/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":2674564170,"node_id":"MDU6TGFiZWwyNjc0NTY0MTcw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Needs-Triage","name":"Needs-Triage","color":"CAD1A6","default":false,"description":"The issue is new and needs to be triaged by a work group."}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":0,"created_at":"2026-08-30T04:29:00Z","updated_at":"2026-08-30T04:29:00Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\nCompare the Microsoft package repositories for the current and previous OS releases:\n\nDebian 13:\nhttps://packages.microsoft.com/debian/13/prod/pool/main/p/powershell-lts/\n\nRHEL 10:\nhttps://packages.microsoft.com/rhel/10/prod/Packages/p/\n\nNeither provides a powershell-lts package.\n\nThe equivalent repositories for Debian 12 and RHEL 9 provide powershell-lts 7.4.x.\n\n### Expected behavior\n\n```console\n`powershell-lts` package should be available for Debian 13 and RHEL 10, providing the current PowerShell 7.6 LTS release.\n```\n\n### Actual behavior\n\n```console\n`powershell-lts` package is unavailable for Debian 13 and RHEL 10, while it remains available for Debian 12 and RHEL 9.\n```\n\n### Error details\n\n```console\n\n```\n\n### Environment data\n\n```powershell\nN/A\n```\n\n### Visuals\n\n_No response_","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27904/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27904/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27903","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27903/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27903/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27903/events","html_url":"https://github.com/PowerShell/PowerShell/pull/27903","id":5287881293,"node_id":"PR_kwDOAvT7bc8AAAABBdGFpw","number":27903,"title":"fix AvoidUsingEmptyCatchBlock rule violation","user":{"login":"xtqqczze","id":45661989,"node_id":"MDQ6VXNlcjQ1NjYxOTg5","avatar_url":"https://avatars.githubusercontent.com/u/45661989?v=4","gravatar_id":"","url":"https://api.github.com/users/xtqqczze","html_url":"https://github.com/xtqqczze","followers_url":"https://api.github.com/users/xtqqczze/followers","following_url":"https://api.github.com/users/xtqqczze/following{/other_user}","gists_url":"https://api.github.com/users/xtqqczze/gists{/gist_id}","starred_url":"https://api.github.com/users/xtqqczze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtqqczze/subscriptions","organizations_url":"https://api.github.com/users/xtqqczze/orgs","repos_url":"https://api.github.com/users/xtqqczze/repos","events_url":"https://api.github.com/users/xtqqczze/events{/privacy}","received_events_url":"https://api.github.com/users/xtqqczze/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-08-29T17:19:10Z","updated_at":"2026-09-06T14:53:29Z","closed_at":null,"assignee":null,"author_association":"CONTRIBUTOR","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/27903","html_url":"https://github.com/PowerShell/PowerShell/pull/27903","diff_url":"https://github.com/PowerShell/PowerShell/pull/27903.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/27903.patch","merged_at":null},"body":"Fix [`AvoidUsingEmptyCatchBlock.md`](https://github.com/PowerShell/PSScriptAnalyzer/blob/main/docs/Rules/AvoidUsingEmptyCatchBlock.md) PSScriptAnalyzer rule violation.","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27903/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27903/timeline","performed_via_github_app":null,"state_reason":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27899","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27899/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27899/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27899/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27899","id":5278526244,"node_id":"I_kwDOAvT7bc8AAAABOp_rJA","number":27899,"title":"Set-Location fails when target is accessible through non-accessible intermediate directories on Windows","user":{"login":"fnajera-rac-de","id":7532590,"node_id":"MDQ6VXNlcjc1MzI1OTA=","avatar_url":"https://avatars.githubusercontent.com/u/7532590?v=4","gravatar_id":"","url":"https://api.github.com/users/fnajera-rac-de","html_url":"https://github.com/fnajera-rac-de","followers_url":"https://api.github.com/users/fnajera-rac-de/followers","following_url":"https://api.github.com/users/fnajera-rac-de/following{/other_user}","gists_url":"https://api.github.com/users/fnajera-rac-de/gists{/gist_id}","starred_url":"https://api.github.com/users/fnajera-rac-de/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnajera-rac-de/subscriptions","organizations_url":"https://api.github.com/users/fnajera-rac-de/orgs","repos_url":"https://api.github.com/users/fnajera-rac-de/repos","events_url":"https://api.github.com/users/fnajera-rac-de/events{/privacy}","received_events_url":"https://api.github.com/users/fnajera-rac-de/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":2674564170,"node_id":"MDU6TGFiZWwyNjc0NTY0MTcw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Needs-Triage","name":"Needs-Triage","color":"CAD1A6","default":false,"description":"The issue is new and needs to be triaged by a work group."}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-08-28T13:08:50Z","updated_at":"2026-08-30T11:03:37Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\nOn Windows, create a directory hierarchy where the user cannot access intermediate directories directly, but can traverse them due to the standard `SeChangeNotifyPrivilege` / **Bypass traverse checking** privilege and has explicit access to a descendant.\n\nThe following example uses:\n\n```text\nD:\\x\\y\\q\\z\n```\n\nwhere `z` is the accessible target.\n\nThe ACL setup needs to be performed from an elevated PowerShell. `$TestUser` is the non-elevated user that will run the reproduction:\n\n```powershell\n$TestUser = 'DOMAIN\\User'\n\n$Sid = (\n    [System.Security.Principal.NTAccount]::new($TestUser)\n).Translate([System.Security.Principal.SecurityIdentifier]).Value\n\n$Principal = \"*$Sid\"\n\nNew-Item -ItemType Directory -Path 'D:\\x\\y\\q\\z' -Force | Out-Null\nSet-Content -LiteralPath 'D:\\x\\y\\q\\z\\test.txt' -Value 'This is a test'\n\n# Deny access to the intermediate directories themselves.\n# These ACEs don't inherit to descendants.\nicacls 'D:\\x\\y'   /deny \"$Principal`:F\"\nicacls 'D:\\x\\y\\q' /deny \"$Principal`:F\"\n\n# Explicitly grant access to the final target and its descendants.\nicacls 'D:\\x\\y\\q\\z' /grant:r \"$Principal`:(OI)(CI)(M)\"\n```\n\nStart a new, non-elevated PowerShell process as `$TestUser`.\n\nVerify that the standard Windows bypass-traverse privilege is present:\n\n```powershell\nwhoami /priv | Select-String SeChangeNotifyPrivilege\n```\n\nFor example:\n\n```text\nSeChangeNotifyPrivilege    Bypass traverse checking    Enabled\n```\n\nThe target directory is accessible even though an intermediate path component isn't:\n\n```powershell\nGet-Item -LiteralPath 'D:\\x\\y\\q'\n```\n\nResult:\n\n```text\nGet-Item: Access to the path 'D:\\x\\y\\q' is denied.\nGet-Item: Cannot find path 'D:\\x\\y\\q' because it does not exist.\n```\n\nHowever, accessing the descendant succeeds:\n\n```powershell\nGet-Item -LiteralPath 'D:\\x\\y\\q\\z'\nGet-ChildItem -LiteralPath 'D:\\x\\y\\q\\z'\nGet-Content -LiteralPath 'D:\\x\\y\\q\\z\\test.txt'\n```\n\nThe process current directory can also be set to the target:\n\n```powershell\n[Environment]::CurrentDirectory = 'D:\\x\\y\\q\\z'\n[Environment]::CurrentDirectory\n```\n\nResult:\n\n```text\nD:\\x\\y\\q\\z\n```\n\nFinally:\n\n```powershell\nSet-Location -LiteralPath 'D:\\x\\y\\q\\z'\n```\n\n### Expected behavior\n\n`Set-Location` should succeed:\n\n```text\nPS D:\\x\\y\\q\\z>\n```\n\nThe target directory is accessible and Windows permits traversal through the intermediate directories using `SeChangeNotifyPrivilege` (\"Bypass traverse checking\").\n\nDirect navigation to an inaccessible target should still fail, for example:\n\n```powershell\nSet-Location -LiteralPath 'D:\\x\\y\\q'\n```\n\n### Actual behavior\n\n`Set-Location` fails while inspecting the inaccessible intermediate component:\n\n```text\nSet-Location: Access to the path 'D:\\x\\y\\q' is denied.\n```\n\nThis differs from direct filesystem access to the same final target, which succeeds.\n\n### Error details\n\nOn current PowerShell `master`, the exception originates from FileSystemProvider path normalization:\n\n```text\nSystem.UnauthorizedAccessException: Access to the path 'D:\\x\\y\\q' is denied.\n   at System.IO.FileSystemInfo.EnsureDataInitialized()\n   at System.IO.FileSystemInfo.get_Attributes()\n   at Microsoft.PowerShell.Commands.FileSystemProvider.GetFileSystemInfo(String path, Boolean& isContainer)\n   at Microsoft.PowerShell.Commands.FileSystemProvider.NormalizeThePath(String basepath, Stack`1 tokenizedPathStack)\n   at Microsoft.PowerShell.Commands.FileSystemProvider.NormalizeRelativePathHelper(String path, String basePath)\n   at Microsoft.PowerShell.Commands.FileSystemProvider.NormalizeRelativePath(String path, String basePath)\n   at System.Management.Automation.Provider.NavigationCmdletProvider.NormalizeRelativePath(String path, String basePath, CmdletProviderContext context)\n   at System.Management.Automation.SessionStateInternal.NormalizeRelativePath(ProviderInfo provider, String path, String basePath, CmdletProviderContext context)\n```\n\n`NormalizeThePath()` builds the path component by component and calls:\n\n```csharp\nvar fsinfo = GetFileSystemInfo(currentPath, out bool _);\n```\n\n`GetFileSystemInfo()` retrieves `FileSystemInfo.Attributes`.\n\nAs a result, PowerShell requires metadata access to intermediate path components while normalizing the path. This can fail even though Windows itself permits traversal through those components and access to the final target.\n\n### Additional context\n\nI tested a proof-of-concept change against current `master` that ignores `UnauthorizedAccessException` from `GetFileSystemInfo()` only for intermediate path components:\n\n```csharp\nFileSystemInfo fsinfo = null;\n\ntry\n{\n    fsinfo = GetFileSystemInfo(currentPath, out bool _);\n}\ncatch (UnauthorizedAccessException) when (tokenizedPathStack.Count > 0)\n{\n    // Access to an intermediate path component isn't required when\n    // the operating system permits traversal through that component.\n}\n```\n\nThis is intended only as a proof of concept, not necessarily as the proposed implementation.\n\nWith this change, the reproduction above behaves as follows:\n\n```text\nGet-Item D:\\x\\y\\q             -> Access denied\nGet-Item D:\\x\\y\\q\\z           -> succeeds\nGet-ChildItem D:\\x\\y\\q\\z      -> succeeds\nGet-Content ...\\z\\test.txt    -> succeeds\n\nSet-Location D:\\x\\y\\q         -> Access denied\nSet-Location D:\\x\\y\\q\\z       -> succeeds\n```\n\nPath normalization also retains the expected distinction between an accessible and inaccessible final target:\n\n```powershell\nSet-Location 'D:\\x\\y\\q\\z\\..\\z'\n# succeeds, resolves to D:\\x\\y\\q\\z\n\nSet-Location 'D:\\x\\y\\q\\z\\..'\n# Access denied, resolves to D:\\x\\y\\q\n```\n\nThis suggests that requiring metadata access to every intermediate path component in `FileSystemProvider.NormalizeThePath()` is what prevents `Set-Location` from respecting Windows bypass-traverse semantics.\n\n### Environment data\n\n```powershell\nName                           Value\n----                           -----\nPSVersion                      7.6.5\nPSEdition                      Core\nGitCommitId                    7.6.5\nOS                             Microsoft Windows 10.0.26200\nPlatform                       Win32NT\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\nPSRemotingProtocolVersion      2.4\nSerializationVersion           1.1.0.1\nWSManStackVersion              3.0\n```\n\n\nand\n\n\n```powershell\nName                           Value\n----                           -----\nPSVersion                      7.7.0-preview.3\nPSEdition                      Core\nGitCommitId                    7.7.0-preview.3-40-g2dc81fde9b0485883f4689287724503739540443\nOS                             Microsoft Windows 10.0.26200\nPlatform                       Win32NT\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\nPSRemotingProtocolVersion      2.4\nSerializationVersion           1.1.0.1\nWSManStackVersion              3.0\n```\n\n### Visuals\n\n_No response_","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27899/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27899/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null},{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27898","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27898/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27898/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27898/events","html_url":"https://github.com/PowerShell/PowerShell/issues/27898","id":5273443244,"node_id":"I_kwDOAvT7bc8AAAABOlJbrA","number":27898,"title":"MSI INSTALLFOLDER breaks Microsoft Update detection: MU offers all serviced builds, including the installed version","user":{"login":"smlfrysamuri","id":5232723,"node_id":"MDQ6VXNlcjUyMzI3MjM=","avatar_url":"https://avatars.githubusercontent.com/u/5232723?v=4","gravatar_id":"","url":"https://api.github.com/users/smlfrysamuri","html_url":"https://github.com/smlfrysamuri","followers_url":"https://api.github.com/users/smlfrysamuri/followers","following_url":"https://api.github.com/users/smlfrysamuri/following{/other_user}","gists_url":"https://api.github.com/users/smlfrysamuri/gists{/gist_id}","starred_url":"https://api.github.com/users/smlfrysamuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smlfrysamuri/subscriptions","organizations_url":"https://api.github.com/users/smlfrysamuri/orgs","repos_url":"https://api.github.com/users/smlfrysamuri/repos","events_url":"https://api.github.com/users/smlfrysamuri/events{/privacy}","received_events_url":"https://api.github.com/users/smlfrysamuri/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[{"id":2674564170,"node_id":"MDU6TGFiZWwyNjc0NTY0MTcw","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Needs-Triage","name":"Needs-Triage","color":"CAD1A6","default":false,"description":"The issue is new and needs to be triaged by a work group."}],"state":"open","locked":false,"assignees":[],"milestone":null,"comments":1,"created_at":"2026-08-28T00:41:17Z","updated_at":"2026-09-03T11:04:11Z","closed_at":null,"assignee":null,"author_association":"NONE","issue_field_values":[],"type":null,"active_lock_reason":null,"sub_issues_summary":{"total":0,"completed":0,"percent_completed":0},"issue_dependencies_summary":{"blocked_by":0,"total_blocked_by":0,"blocking":0,"total_blocking":0},"body":"### Prerequisites\n\n- [x] Write a descriptive title.\n- [x] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [x] Search the existing issues.\n- [x] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [x] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\n1. Install PowerShell 7.6.5 (x64) via MSI to a non-default location on a non-system volume:\n\n```\n   msiexec /i PowerShell-7.6.5-win-x64.msi INSTALLFOLDER=\"X:\\Program Files\\PowerShell-7-x64\\7\"\n```\n\n2. Ensure \"Receive updates for other Microsoft products\" is enabled.\n3. Run an online update scan.\n\n### Expected behavior\n\n```console\nMicrosoft Update detects the installed 7.6.5 and offers nothing, or offers only a genuinely\nnewer build.\n```\n\n### Actual behavior\n\n```console\nMU offers three PowerShell packages at once, including the exact version already installed:\n\n    PowerShell v7.3.1 (x64)\n    PowerShell v7.6.3 (x64)\n    PowerShell v7.6.5 (x64)\n\n7.6.3 and 7.3.1 fail on install. The offers return on every subsequent scan regardless of\noutcome, including after a successful install.\n\nCreating a directory junction at the default install path makes all three disappear on the\nvery next scan:\n\n    mklink /J \"C:\\Program Files\\PowerShell\\7\" \"X:\\Program Files\\PowerShell-7-x64\\7\"\n\nNothing else changed between the two scans. This suggests MU detection probes a hard-coded\ndefault path rather than reading HKLM\\SOFTWARE\\Microsoft\\PowerShellCore\\InstalledVersions or\nthe Windows Installer product registration, both of which were present and correct throughout.\n```\n\n### Error details\n\n```console\nInstall failures:\n    PowerShell v7.6.3 (x64)  -  0x80070643\n    PowerShell v7.3.1 (x64)  -  0x8024200b\n\nThis is a detection failure, not supersedence (as postulated in possibly related issue #26046). \n\nThree points:\n\n1. The already-installed version is offered. 7.6.5 was offered alongside the older builds\n   while 7.6.5 was installed and correctly registered. No supersedence rule explains offering\n   a package identical to what is installed. MU appears to conclude PowerShell is absent, so\n   the catalog offers everything.\n\n2. Installing an offered build does not stop it being re-offered. Update history shows 7.6.3\n   installing successfully, then 7.6.5 74 seconds later, also successful:\n\n       8/17/2026 10:50:52 PM   PowerShell v7.6.3 (x64)   ResultCode 2 (Succeeded)\n       8/17/2026 10:52:06 PM   PowerShell v7.6.5 (x64)   ResultCode 2 (Succeeded)\n\n   7.6.3 was offered again ten days later.\n\n3. The MSI registration is healthy:\n\n       ProductCode  : {499CA787-2899-40D2-A793-087E08EB227D}\n       Name         : PowerShell 7-x64\n       Version      : 7.6.5.0\n       LocalPackage : C:\\Windows\\Installer\\1485d9e1.msi\n       CacheExists  : True\n\n   HKLM\\SOFTWARE\\Microsoft\\PowerShellCore\\InstalledVersions is also correct:\n\n       31ab5147-9a97-4452-8443-d9709f0516e1   7.6.5   X:\\Program Files\\PowerShell-7-x64\\7\\\n\n   No orphaned product registrations, no dangling upgrade-code mappings. Reinstalling with\n   REINSTALL=ALL REINSTALLMODE=vomus completes with \"MainEngineThread is returning 0\".\n\nRuled out:\n- Standard WU remediation (stop wuauserv/cryptsvc, delete SoftwareDistribution and catroot2,\n  SFC, DISM) has no effect.\n- USE_MU=0 ENABLE_MU=0 applies cleanly, confirmed in the verbose log property table, and\n  changes nothing. That property governs whether PowerShell registers for MU servicing, not\n  whether MU can detect the install.\n\nSuggested fixes:\n- Have the MU applicability rules read PowerShellCore\\InstalledVersions or the MSI product\n  registration instead of probing a fixed filesystem path.\n- Populate ARPINSTALLLOCATION from INSTALLFOLDER. InstallLocation is currently empty in\n  Installer\\UserData\\...\\InstallProperties and ARPINSTALLLOCATION never appears in a verbose\n  install log. This one is entirely within the MSI's control.\n- At minimum, document that INSTALLFOLDER is incompatible with Microsoft Update servicing.\n\nI recognise the applicability rules are published service-side and may not be owned by this\nrepo. Happy to be redirected, but the ARPINSTALLLOCATION gap and the undocumented\nINSTALLFOLDER incompatibility are MSI-side.\n\nPossibly related to #26046, though that report appears to involve a default install path, so\nthe mechanism may differ.\n```\n\n### Environment data\n\n```powershell\nName                           Value\n----                           -----\nPSVersion                      7.6.5\nPSEdition                      Core\nGitCommitId                    7.6.5\nOS                             Microsoft Windows 10.0.26200\nPlatform                       Win32NT\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\nPSRemotingProtocolVersion      2.4\nSerializationVersion           1.1.0.1\nWSManStackVersion              3.0\n\nInstalled via MSI to X:\\Program Files\\PowerShell-7-x64\\7 (local volume, not a network drive).\n\nNOTE: ***Predates my move to the Insider channel.*** First appeared on a retail Windows 11 Pro build ~2 months ago, and persisted unchanged across the upgrade, so it is **not Insider-specific**.\n```\n\n### Visuals\n\n_No response_","closed_by":null,"reactions":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27898/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/27898/timeline","performed_via_github_app":null,"state_reason":null,"pinned_comment":null}]