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
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), andCurrentUser— 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.PowerShellConfigisinternal, and reading the rawpowershell.config.jsonfiles 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:
-Effective(default): the merged result the engine actually uses, honoring policy-vs-preference precedence.-Scope: dump a single scope's raw contents.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
MachineFolderscope, so results collapse to the legacy two-scope merge).Related