PowerShell / PowerShell/PowerShell

Return a more actionable error description when the user attempts to write to an MSIX-installation's root.

Open
#25,733 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #27553 by @jshigetomi — closed without merging
Issue-Enhancement Needs-Triage Package-MSIX WG-Cmdlets WG-NeedsReview
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
  1. Register-PSSessionConfiguration

  2. Update-Help -Scope AllUsers

  3. Enable-ExperimentalFeature -Scope AllUsers

  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.