Powershell Add-AppxPackage not working for standard user (only admin)
Author: jeremy-qikCreated Oct 23, 2018Updated Jul 10, 2026
LabelsPlatform: Windows
Hopefully this is the right place (sorry if its not). I am currently trying to side load an appx (UWP) in test kitchen. However it does not work for a standard user. When I set it to an admin account, it works (but that only installs the app for that admin user - I need it installed for a deescalated user). I suspect this is a bug in remote Powershell?
Output:
STDERR: C:\Users\....\AppData\Local\Temp\chef-script20181023-3108-f0qjq7.ps1 : Win32 internal error "Access is denied" 0x5
occurred while reading the console output buffer. Contact Microsoft Customer Support Services.Code:
powershell_script 'Install Appx' do
code 'Add-AppxPackage Example_1.0.0.0.appx'
cwd 'C:\...'
user "standardUserHere"
password "password"
sensitive false
endEdit: The command also works on the box itself when I login as the standard user and it copy into powershell
Source: chef/chef