Title: PS7-packaged: $profile.AllUsersAllHosts not writable by administrators · Issue #27564 · PowerShell/PowerShell · GitHub
Open Graph Title: PS7-packaged: $profile.AllUsersAllHosts not writable by administrators · Issue #27564 · PowerShell/PowerShell
X Title: PS7-packaged: $profile.AllUsersAllHosts not writable by administrators · Issue #27564 · PowerShell/PowerShell
Description: Summary When PowerShell 7 is installed as an MSIX package, the system-wide profile ($profile.AllUsersAllHosts) is not writable by administrators. The parent directory (C:\Program Files\WindowsApps\...) does not grant Administrators write...
Open Graph Description: Summary When PowerShell 7 is installed as an MSIX package, the system-wide profile ($profile.AllUsersAllHosts) is not writable by administrators. The parent directory (C:\Program Files\WindowsApps\...
X Description: Summary When PowerShell 7 is installed as an MSIX package, the system-wide profile ($profile.AllUsersAllHosts) is not writable by administrators. The parent directory (C:\Program Files\WindowsApps\...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/27564
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PS7-packaged: $profile.AllUsersAllHosts not writable by administrators","articleBody":"## Summary\n\nWhen PowerShell 7 is installed as an MSIX package, the system-wide profile (`$profile.AllUsersAllHosts`) is not writable by administrators. The parent directory (`C:\\Program Files\\WindowsApps\\...`) does not grant Administrators write permission under the MSIX ACL model.\n\n## Impact\n\nAdministrators cannot modify the machine-wide PowerShell profile, which is a common enterprise configuration pattern for:\n\n- Setting organization-wide environment variables\n- Loading enterprise modules on startup\n- Enforcing execution policy and logging hooks\n\nThis is a behavioral difference from the MSI-installed version, where `$profile.AllUsersAllHosts` in `C:\\Program Files\\PowerShell\\7\\` is writable by Administrators.\n\n## Repro\n\n```powershell\n# From an elevated session with MSIX-packaged PS7\n$profile.AllUsersAllHosts\n# Returns path inside C:\\Program Files\\WindowsApps\\...\n\nAdd-Content -Path $profile.AllUsersAllHosts -Value '# test'\n# Access is denied.\n```\n\n## Workaround\n\nNone currently. A potential mitigation using MSIX mutable package directories is under investigation. Reference: https://learn.microsoft.com/en-us/windows/msix/manage/create-directory\n\n## Context\n\nWe are tracking this internally and working toward a resolution. We will update this issue as progress is made.\r\n\n\n---\n\n**Update — profile relocation deferred from #27632 (still open)**\n\nThe MachineFolder per-machine data store (design **#27697**) is the intended fix. However, **PR #27632 has been scoped down to configuration-file merging only**, and the AllUsers *profile* relocation was **removed from that PR** and deferred to a dedicated follow-up.\n\nAs of that change, the AllUsers profile path resolves to `$PSHOME` again (`Utils.GetApplicationBase(shellId)` in `HostUtilities.cs`) on every install type, so under MSIX the machine-wide profile remains non-writable by admins — i.e. **this gap is not yet resolved**. This issue remains the tracking item for implementing the relocation.\n\nOpen questions for the follow-up PR:\n- Relocate both `AllUsersAllHosts` and `AllUsersCurrentHost` (and keep host-specific separation, e.g. `pwsh` vs. the VS Code host).\n- Ensure all users can read the relocated profiles (MachineFolder SDDL grants read to all users, write to admins).\n- Keep per-package-family isolation (stable / preview / LTS).\n- Surface the effective location via `$PROFILE.*` and document how to discover/edit it.\n- Validate system-account installs.\n\nRelated: #27697 (design), #27565 (MSIX tracking), #27702 (experimental features, also deferred from #27632).\r\n","author":{"url":"https://github.com/theJasonHelmick","@type":"Person","name":"theJasonHelmick"},"datePublished":"2026-06-05T15:26:43Z","url":"https://github.com/PowerShell/PowerShell/issues/27564"}
| 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:637a9b9a-a849-90d6-fdf7-64c6b62ab6fc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ECBE:10E64B:1F02B7:2917B5:6AFD12B3 |
| html-safe-nonce | fd0094d0f0e7133f247294c38cecd7bac29c65ab1dff09fa614046a211785070 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQ0JFOjEwRTY0QjoxRjAyQjc6MjkxN0I1OjZBRkQxMkIzIiwidmlzaXRvcl9pZCI6IjkwNzgzNzAzNjA3MzQwNjEyMzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 993003b8f77dfd5ccd195ee8a13be859060480d7b1a96120bd2ab0a957759fb2 |
| hovercard-subject-tag | issue:4598061404 |
| 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/27564/issue_layout |
| twitter:image | https://opengraph.githubassets.com/473af2b4857eb22f59a6cf747ae7141285264028ab2afa9eb6f6a056603e1315/PowerShell/PowerShell/issues/27564 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/473af2b4857eb22f59a6cf747ae7141285264028ab2afa9eb6f6a056603e1315/PowerShell/PowerShell/issues/27564 |
| og:image:alt | Summary When PowerShell 7 is installed as an MSIX package, the system-wide profile ($profile.AllUsersAllHosts) is not writable by administrators. The parent directory (C:\Program Files\WindowsApps\... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | theJasonHelmick |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7c34e25df4e46e972c8f0225e63410231bdeb9ea5634597c712796bbcdb2e627 |
| 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 | 8fa571ebaa95e4e6bf872197c0e84b7dc48e6785 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width