Please feel free to provide feedback or file bugs here.

Add-AppxPackage (Chef, WinRM) - Errors - Message: Contact Microsoft Customer Support Services

Sorry if this is the wrong place, I created an issue https://github.com/chef/chef/issues/7765 but I am not sure its an issue with Chef.
I have also created an issue https://github.com/PowerShell/PowerShell/issues/8148 .
I am not very familiar with Powershell sorry, so I am unable to replicate without Chef (If I knew how it would be handy to try and replicate with pure WinRM).

Steps to reproduce
------------------
In Chef
```powershell
cd C:/Test
Add-AppxPackage Example_1.0.0.0_x64.appx -DependencyPath "Dependencies\\x64\\A.appx","Dependencies\\x64\\B.appx","Dependencies\\x64\\C.appx"
```
This is trying to install an appx for a standard user. I believe Chef uses WinRM to run the commands.

Expected behavior
-----------------
```
App installs. Testing the command when physically logging in as the standard user and running powershell, it does work (appx installs).
```
```powershell
get-appxpackage -allusers -name *example*
(result is empty)
```

Actual behavior
---------------
```
Win32 internal error "Access is denied" 0x5 occurred while reading the console output buffer. Contact Microsoft Customer Support Services.
```

Environment data
----------------
```powershell
Name Value
---- -----
PSVersion 5.1.17134.228
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.228
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```

Additional Notes
----------------
I have tried everything I can think of, the only thing that works is starting another powershell script as the user (see the ticket on Chef). Please see https://github.com/chef/chef/issues/7765 for more details.

1 vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Jeremy shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base