PowerShell / PowerShell/PowerShell
Return a more actionable error description when the user attempts to write to an MSIX-installation's root.
Nobody has claimed this yet.
- #27553 by @jshigetomi — closed without merging
- Dominant language
- C#
- Stars
- 55.5k
- Forks
- 8.5k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 88
Description
Summary of the new feature / enhancement
I want to execute any of the commands that learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5#known-limitations disallows: ^1
[1]: https://github.com/PowerShell/PowerShell/discussions/25729#discussioncomment-13676474
Register-PSSessionConfiguration
Update-Help -Scope AllUsers
Enable-ExperimentalFeature -Scope AllUsers
Set-ExecutionPolicy -Scope LocalMachine
As an example, when I invoke Set-ExecutionPolicy -Scope LocalMachine, I see similar to:
Access to the path '
$Env:ProgramFiles\WindowsApps\Microsoft.PowerShellPreview_7.6.4.0_x005F_x64__8wekyb3d8bbwe\powershell.config.json' is denied. To change the execution policy for the default (LocalMachine) scope, start PowerShell with the "Run as administrator" option. To change the execution policy for the current user, run "Set-ExecutionPolicy -Scope CurrentUser".
Considering that PowerShell knows that it's been installed with Add-AppxPackage, it knows the cause of this. Consequently, the user should be informed of the reason, or it should cite the relevant documentation.
Proposed technical implementation details (optional)
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the four commands listed in the issue and the linked MSIX known-limitations documentation, then trace how each reports denied writes under the WindowsApps installation root. Done means affected commands provide an actionable explanation of the MSIX restriction or point users to the relevant documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100