Skip to content

Conversation

@TravisEz13
Copy link
Member

Backport of #26348 to release/v7.6

Triggered by @TravisEz13 on behalf of @daxian-dbw

Original CL Label: CL-General

/cc @PowerShell/powershell-maintainers

Impact

REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.

Tooling Impact

  • Required tooling change
  • Optional tooling change (include reasoning)

Customer Impact

  • Customer reported
  • Found internally

This enables three experimental features by default in v7.6:

  • PSNativeWindowsTildeExpansion: Windows users get automatic tilde (~) expansion for home directory
  • PSRedirectToVariable: Users can redirect output to variables (e.g., command > $var)
  • PSSubsystemPluginModel: Get-PSSubsystem cmdlet becomes available without requiring experimental feature flag

These features were experimental and now become standard functionality, improving the user experience without requiring configuration.

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Original PR included test cleanup to remove experimental feature checks. Backport verified by:

  1. Confirming all test modifications apply cleanly
  2. Verifying experimental feature entries are properly removed from ExperimentalFeature.cs
  3. Checking that Get-PSSubsystem cmdlet is correctly added to InitialSessionState (making PSSubsystemPluginModel stable)
  4. Ensuring experimental attributes are removed from affected cmdlets

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

Medium risk: This stabilizes three experimental features (PSNativeWindowsTildeExpansion, PSRedirectToVariable, PSSubsystemPluginModel) that have been available and tested in previous releases. The changes affect core engine functionality but have been validated in the main branch. The features are well-tested and moving to stable status is appropriate for a release branch.

Merge Conflicts

The file src/System.Management.Automation/engine/ExperimentalFeature/ExperimentalFeature.cs had conflicts during cherry-pick.

Conflict: Release branch v7.6 contained experimental feature entries for PSNativeWindowsTildeExpansion and PSRedirectToVariable that were being removed by the PR to make them stable.

Resolution: Removed the two experimental feature entries from the engine features array, keeping only PSLoadAssemblyFromNativeCode, PSFeedbackProvider, PSSerializeJSONLongEnumAsNumber, and PSProfileDSCResource.

Context: The PR removes features from the experimental list because they are being stabilized (made available by default). PSSubsystemPluginModel was already absent from v7.6's experimental features list.

The following experimental features are made stable:
- PSNativeWindowsTildeExpansion
- PSRedirectToVariable
- PSSubsystemPluginModel
Copilot AI review requested due to automatic review settings November 19, 2025 22:10
@TravisEz13 TravisEz13 added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Nov 19, 2025
@TravisEz13 TravisEz13 requested a review from a team as a code owner November 19, 2025 22:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR backports changes from #26348 to make three experimental features stable in PowerShell v7.6: PSNativeWindowsTildeExpansion, PSRedirectToVariable, and PSSubsystemPluginModel. The changes remove experimental feature flags, related checks in code and tests, and add the Get-PSSubsystem cmdlet to the default session state.

Key Changes:

  • Removed experimental feature definitions and checks for PSNativeWindowsTildeExpansion, PSRedirectToVariable, and PSSubsystemPluginModel
  • Added Get-PSSubsystem cmdlet to default session state (previously only available with experimental flag)
  • Updated tests to remove experimental feature validation and skip conditions

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/tools/TestMetadata.json Removes experimental feature entries from test metadata configuration (includes additional features beyond those mentioned in PR description)
test/powershell/engine/Basic/DefaultCommands.Tests.ps1 Adds Get-PSSubsystem cmdlet to expected default commands list
test/powershell/Modules/Microsoft.PowerShell.Utility/Set-Variable.Tests.ps1 Removes experimental feature checks and skip logic for -Append parameter tests
test/powershell/Language/Scripting/NativeExecution/NativeWindowsTildeExpansion.Tests.ps1 Removes experimental feature validation check from test setup
test/powershell/Language/Parser/RedirectionOperator.Tests.ps1 Removes experimental feature checks and skip logic for variable redirection tests
src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs Removes PSRedirectToVariable feature checks, making variable redirection always available
src/System.Management.Automation/engine/Subsystem/Commands/GetPSSubsystemCommand.cs Removes Experimental attribute from Get-PSSubsystem cmdlet
src/System.Management.Automation/engine/NativeCommandParameterBinder.cs Removes PSNativeWindowsTildeExpansion feature check, making tilde expansion always active on Windows
src/System.Management.Automation/engine/InitialSessionState.cs Adds Get-PSSubsystem cmdlet unconditionally to default session state
src/System.Management.Automation/engine/ExperimentalFeature/ExperimentalFeature.cs Removes experimental feature constant definitions and feature entries for the three stabilized features
src/Microsoft.PowerShell.Commands.Utility/commands/utility/Var.cs Removes Experimental attribute from Set-Variable's -Append parameter

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

@daxian-dbw daxian-dbw merged commit 9532f85 into PowerShell:release/v7.6 Nov 20, 2025
44 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants