Add-AppSharedPackageContainer

%3CLINGO-SUB%20id%3D%22lingo-sub-2336099%22%20slang%3D%22en-US%22%3EAdd-AppSharedPackageContainer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2336099%22%20slang%3D%22en-US%22%3E%3CP%3E%5BStarting%20a%20new%20item%20on%20this%5D%3C%2FP%3E%0A%3CP%3EFeedback%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EThe%20online%20documentation%20does%20not%20match%20the%20get-help%3C%2FLI%3E%0A%3CLI%3EThe%20cmdlet%20seems%20unable%20to%20use%20a%20UNC%20share%20path%20for%20the%20filename%2C%20it%20must%20be%20a%20local%20file.%26nbsp%3B%20This%20would%20seem%20pretty%20much%20a%20requirement%20for%20the%20cmdlet.%3C%2FLI%3E%0A%3CLI%3EThe%20cmdlet%20requires%20elevation%2C%20even%20if%20only%20affecting%20the%20current%20user%20and%20not%20picking%20any%20fancy%20options.%26nbsp%3B%20Given%20that%20Add-AppXPackage%20doesn't%20need%20this%20elevation%2C%20it%20seems%20that%20this%20shouldn't%20either.%3C%2FLI%3E%0A%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2345029%22%20slang%3D%22en-US%22%3ERE%3A%20Add-AppSharedPackageContainer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2345029%22%20slang%3D%22en-US%22%3EHi%2C%20thanks%20for%20the%20feedback%2C%20we%20are%20looking%20into%20the%20issue.%3C%2FLINGO-BODY%3E
MVP

[Starting a new item on this]

Feedback:

  1. The online documentation does not match the get-help
  2. The cmdlet seems unable to use a UNC share path for the filename, it must be a local file.  This would seem pretty much a requirement for the cmdlet.
  3. The cmdlet requires elevation, even if only affecting the current user and not picking any fancy options.  Given that Add-AppXPackage doesn't need this elevation, it seems that this shouldn't either.
2 Replies
Hi, thanks for the feedback, we are looking into the issue.

@Dian Hartono I have learned a bit more on item #2.

  • The issue with UNC share filenames only occurs when the PowerShell is run from inside the container.
  • I have only seen it on 20H2 and is not a problem from inside the container on build 21345+
  • It also affects Add-AppXPackage from inside the container.
  • Placing the filename in quotations yields an odd result that might shed light on what is going on. Without the quotes, the PowerShell error is file not found and references the file in the same form as requested (\\server\share\folder\filename). Adding quotation marks around the UNC name results in file not found with a path constructed like C:\Program Files\WindowsApps\PackageFamilyName'\server\share\folder\filename'   In other words prepending either the package root or working directory folder, turning double quotes into single, and loosing the opening slash in \\server.

I am investigating for a workaround to getting this to work from code running inside the container. Who knew MSIX packages would have compatibility issues? :suprised: For the shared container file making a quick temporary copy locally is a fine workaround, but I'm not interested in doing that for packages and will try to pop the PowerShell outside of the container as a solution..