chef: Powershell Add-AppxPackage not working for standard user (only admin)
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
end
Edit: The command also works on the box itself when I login as the standard user and it copy into powershell
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 16
I’m not sure if this will apply to your problem or not, but I’ve just managed to resolve a similar issue (with
Install-WindowsFeaturerather thanAdd-AppxPackage), by disabling the progress bar display beforehand:Might be worth a try.
Incase someone else finds this. I thought it might be related to the
-NoProfilewhen powershell_script runs, but I tried (below) with no luck