Summary of the new feature/enhancement
For Snap and AppX packages of PSCore6, $PSHOME is effectively read-only. Any configuration stored in $PSHOME needs to be in a different location. On Windows 10, it would make sense to be in $env:SystemDrive\ProgramData.
Register-PSSessionConfiguration stores the config file in $PSHOME\SessionConfig folder.
powershell.config.json for the system is stored in $PSHOME, this means that admins can't set system wide config and cmdlets like Enable-ExperimentalFeature -Scope AllUsers won't work.
Update-Help -Scope AllUsers also won't work as it's stored in $PSHOME.
When this is fixed, test changes relying on Test-CanWriteToPsHome should be reverted.
Update — scope narrowed; solved via the MachineFolder data store
The pieces this issue originally enumerated are now split up:
This issue is narrowed to the SessionConfig .pssc write-location: Register/Set-PSSessionConfiguration copy the .pssc into $PSHome\SessionConfig (Utils.DefaultPowerShellAppBase, CustomShellCommands.cs:950), which is read-only under MSIX. The fix mirrors the profile relocation — Utils.GetPackagedMachineDataStorePath() ?? AppBase + \SessionConfig.
WinRM / remoting activation under MSIX (native pwrshplugin.dll registration) remains a separate concern tracked in #27563. Tracked under #27565.
Summary of the new feature/enhancement
For Snap and AppX packages of PSCore6, $PSHOME is effectively read-only. Any configuration stored in $PSHOME needs to be in a different location. On Windows 10, it would make sense to be in $env:SystemDrive\ProgramData.
Register-PSSessionConfigurationstores the config file in $PSHOME\SessionConfig folder.powershell.config.jsonfor the system is stored in $PSHOME, this means that admins can't set system wide config and cmdlets likeEnable-ExperimentalFeature -Scope AllUserswon't work.Update-Help -Scope AllUsersalso won't work as it's stored in $PSHOME.When this is fixed, test changes relying on
Test-CanWriteToPsHomeshould be reverted.Update — scope narrowed; solved via the MachineFolder data store
The pieces this issue originally enumerated are now split up:
powershell.config.jsonandEnable/Disable-ExperimentalFeature -Scope AllUsers→ handled by the config relocation: design [Design] MachineFolder: a per-machine writable data store for MSIX-packaged PowerShell #27697, implementation PR Place System-Wide Config in the Machine Folder for MSIX Packages #27632.Update-Help -Scope AllUsers→ now tracked in PS7-packaged: Update-Help -Scope AllUsers fails under MSIX ($PSHOME read-only) #27699.Test-CanWriteToPsHometest reverts → revisited as each piece lands.This issue is narrowed to the SessionConfig
.psscwrite-location:Register/Set-PSSessionConfigurationcopy the.psscinto$PSHome\SessionConfig(Utils.DefaultPowerShellAppBase,CustomShellCommands.cs:950), which is read-only under MSIX. The fix mirrors the profile relocation —Utils.GetPackagedMachineDataStorePath() ?? AppBase+\SessionConfig.WinRM / remoting activation under MSIX (native
pwrshplugin.dllregistration) remains a separate concern tracked in #27563. Tracked under #27565.