Title: [Design] MachineFolder: a per-machine writable data store for MSIX-packaged PowerShell · Issue #27697 · PowerShell/PowerShell · GitHub
Open Graph Title: [Design] MachineFolder: a per-machine writable data store for MSIX-packaged PowerShell · Issue #27697 · PowerShell/PowerShell
X Title: [Design] MachineFolder: a per-machine writable data store for MSIX-packaged PowerShell · Issue #27697 · PowerShell/PowerShell
Description: Summary Under MSIX, $PSHOME is read-only and package registration is per-user, so PowerShell has nowhere to persist system-wide state (config, profile, session configuration, updatable help). This issue describes the shared mechanism tho...
Open Graph Description: Summary Under MSIX, $PSHOME is read-only and package registration is per-user, so PowerShell has nowhere to persist system-wide state (config, profile, session configuration, updatable help). This ...
X Description: Summary Under MSIX, $PSHOME is read-only and package registration is per-user, so PowerShell has nowhere to persist system-wide state (config, profile, session configuration, updatable help). This ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/27697
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Design] MachineFolder: a per-machine writable data store for MSIX-packaged PowerShell","articleBody":"## Summary\r\n\r\nUnder MSIX, `$PSHOME` is read-only and package registration is per-user, so PowerShell has nowhere to persist **system-wide** state (config, profile, session configuration, updatable help). This issue describes the shared mechanism those individual gaps build on: an **admin-writable, all-users-readable per-machine data store** (\"MachineFolder\"), and the configuration merge model layered on top of it.\r\n\r\nThis is the solution substrate for the gaps first reported in #9278 and tracked under #27565. First implementation (system-wide config) is in PR #27632.\r\n\r\n## Mechanism\r\n\r\n- **Opt in** via the AppxManifest `appdata:ApplicationData` → `appdata:MachineFolder` extension. The OS provisions the folder at `…\\AppRepository\\Families\\ApplicationData\\\u003cPackageFamilyName>\\Machine`.\r\n- **ACL** via SDDL `(A;OICI;GA;;;BA)(A;OICI;GR;;;BU)` → Administrators full control, Built-in Users read, both inherited to child files and subfolders.\r\n- **Detection / entry point:** `Utils.GetPackagedMachineDataStorePath()` — resolves the store using `GetCurrentPackageFamilyName` (kernel32) plus the `PackageRepositoryRoot` registry value. Returns `null` when the process has no package identity (unpackaged) or off-Windows, so all behavior collapses to the legacy model when the store is absent.\r\n\r\n## Configuration model (first consumer — PR #27632)\r\n\r\n- New `ConfigScope.MachineFolder`, alongside `AllUsers` (= `$PSHOME`, read-only product defaults) and `CurrentUser`.\r\n- Merge precedence:\r\n - **Policy settings:** MachineFolder → `$PSHOME` → CurrentUser (system wins)\r\n - **Preference settings:** CurrentUser → MachineFolder → `$PSHOME` (user wins)\r\n- Writes targeting `AllUsers` are redirected to the MachineFolder store when packaged; only **changed** values are written (the shipped `$PSHOME` product config is never rewritten). Group Policy / registry continues to trump all config.\r\n\r\n## ⚠️ Behavior change to fold in\r\n\r\nExperimental features moved to an explicit per-feature enabled/disabled model (per-scope `ExperimentalFeatures` + `DisabledExperimentalFeatures` sets). A consequence: an older config that *disabled a preview feature by omission* (a reduced `ExperimentalFeatures` list) is reinterpreted as \"explicit enables plus product defaults,\" so that feature re-enables once. Old JSON still parses and loads. This is what currently updates `test/powershell/engine/ExperimentalFeature/Get-ExperimentalFeature.Tests.ps1` (the \"Feature is enabled in user config only\" case) and relates to the `Test-CanWriteToPsHome` revert called out in #9278.\r\n\r\n## Rollout / children\r\n\r\n- [ ] System-wide **config** relocation — PR #27632\r\n- [ ] AllUsers **profile** relocation — #27564\r\n- [ ] **SessionConfig** `.pssc` write-location (`Register`/`Set-PSSessionConfiguration`) — #9278 _(WinRM/remoting activation tracked separately in #27563)_\r\n- [ ] **Updatable help** at system scope — #27699\r\n- [ ] **Export effective config** cmdlet — #27698\r\n\r\n## Non-goals\r\n\r\n- Mutable/mutable-directory packages.\r\n- Package Support Framework (PSF): changes the entry point to a per-user, non-elevated launcher, so it cannot provision or seed an admin-owned machine store.\r\n\r\n_Tracked by #27565._\r\n","author":{"url":"https://github.com/jshigetomi","@type":"Person","name":"jshigetomi"},"datePublished":"2026-07-17T20:00:03Z","url":"https://github.com/PowerShell/PowerShell/issues/27697"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ef8e1332-e1c1-3a87-a779-3705f1b7ff72 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8C34:E818:55DE7F:75DA2C:6AFD1B77 |
| html-safe-nonce | b24455cce666d5ca16c00bd740d2637c1231111377b9dea668bdbcb5c7d8ec6a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzM0OkU4MTg6NTVERTdGOjc1REEyQzo2QUZEMUI3NyIsInZpc2l0b3JfaWQiOiI0NjQ4MjM5Mjc1Njk3ODM4OTY3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | edccbeaf56e7a2f8142293af2e287630f19ee4d1fe5783c7b5f11a6b9947f0ed |
| hovercard-subject-tag | issue:4914411310 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/27697/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8cf1e0a79369d47b2e34858c2d0e847e810f323ce076b198d216e04406a35954/PowerShell/PowerShell/issues/27697 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8cf1e0a79369d47b2e34858c2d0e847e810f323ce076b198d216e04406a35954/PowerShell/PowerShell/issues/27697 |
| og:image:alt | Summary Under MSIX, $PSHOME is read-only and package registration is per-user, so PowerShell has nowhere to persist system-wide state (config, profile, session configuration, updatable help). This ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jshigetomi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 065128366c233a9d57ff68ab6c96e25b99dd1b0ab70d23b70873d3dd6b5e4f19 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 941021edf0c2ec58298f4a2c8f27ae507d129c92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width