-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
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