Skip to content

PS7-packaged: provide a cmdlet to export the fully merged / effective configuration #27698

Description

Tracked by #27565 · Design: #27697

Summary

With the per-machine data store ("MachineFolder", #27697), the effective PowerShell configuration is now merged across three scopes — MachineFolder, $PSHOME (product defaults), and CurrentUser — and the precedence differs between policy settings (system wins) and preference settings (user wins). There is currently no supported way to see the resolved result. PowerShellConfig is internal, and reading the raw powershell.config.json files by hand no longer reflects what the engine actually applies.

This is a diagnostic gap for administrators: after setting machine-wide policy, they cannot easily confirm the effective execution policy, WinCompat deny list, experimental-feature state, logging config, etc., or which scope won.

Proposal

Provide a read-only cmdlet that emits the fully merged, effective configuration (as JSON), for example:

Get-PSConfiguration [-Scope <MachineFolder|AllUsers|CurrentUser>] [-Effective]
  • -Effective (default): the merged result the engine actually uses, honoring policy-vs-preference precedence.
  • -Scope: dump a single scope's raw contents.
  • Ideally annotate each setting with the scope that "won", to make troubleshooting precedence straightforward.

The cmdlet name/shape is open for design (Get-PSConfiguration, Export-PSConfiguration, Get-PSConfiguration -AsJson, …) and needs Working Group sign-off — no public configuration cmdlet exists today.

Acceptance criteria

  • Emits JSON that matches the engine's actual merge (policy → system-wins, preference → user-wins).
  • Works both packaged and unpackaged (unpackaged simply has no MachineFolder scope, so results collapse to the legacy two-scope merge).
  • Strictly read-only; never writes a config file.
  • Preferably reports the winning source scope per setting.

Related

Activity

  1. added
    Issue-Enhancementthe issue is more of a feature request than a bug
    WG-Cmdletsgeneral cmdlet issues
    WG-Enginecore PowerShell engine, interpreter, and runtime
    Package-MSIXIssue occurs with MSIX package
    on Jul 17, 2026
  2. jshigetomi commented on Jul 20, 2026

    @jshigetomi
    CollaboratorAuthor

    Meeting follow-up note (config-visibility discussion): the design discussion for this should also weigh a DSC-based approach (a "desired configuration" solution) as an alternative — or complement — to a dedicated view/export cmdlet. In other words, decide whether administrators should manage and inspect the system-wide, merged configuration through a DSC resource rather than (or in addition to) something like Get-PSConfiguration -Effective. Capturing here so the option is evaluated during Working Group design rather than defaulting straight to a cmdlet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugPackage-MSIXIssue occurs with MSIX packageWG-Cmdletsgeneral cmdlet issuesWG-Enginecore PowerShell engine, interpreter, and runtime

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions