添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

I created a package that installs Waves MaxxAudio which is a modern application, and its installation uses a line that pulls the files folder where it contains the dependencies of the appx bundle. The installation running from the SCCM software center is perfect, but its removal is not. Researching I found that when running as a system the command “Get-AppxPackage” without the “ -AllUsers ” does not return MaxxAudio, so I put the command line like this:

Get-AppxPackage -AllUsers maxxaudio | Remove-AppxPackage "

But even so it doesn’t work, running as a user with admin permission, it works perfectly. How do I remove a modern app using the system account?

Because the installation works perfectly, but the uninstall doesn’t.

Hey @AegisShimon ,

we’ve build that exact same Application with PSADT.
Please give this a try:

Get-AppxProvisionedPackage -Online | Where-Object { $_.PackageName -match $(${FileName1} -replace '(^.*)_\d+\.\d+..*$', '$1') } | ForEach-Object {
    Remove-AppxProvisionedPackage -Online -PackageName $_.PackageName -AllUsers -LogPath "${configToolkitLogDir}\${PackageName}_$($_.PackageName).log"

Where “FileName1” is that (Main)-Appx-File without the extension.

As far as i can tell this works for us.

Kind regards

tbh, i never saw such behavior.
I copied the command directly out of our WavesMaxxAudio-PSADT-File.

But, when looking over it and assuming an “empty” “Filename1”-Variable, that could be a match against every App, indeed.

We (and you obviously ^.^) may have a check for a valid “Filename1”-Variable beforehand ^.^