I'm doing a task that relies on the ability to uninstall my UWP using a powershell script. Checking this
https://docs.microsoft.com/en-us/powershell/module/appx/remove-appxpackage?view=win10-ps
and https://docs.microsoft.com/en-us/powershell/module/appx/get-appxpackage?view=win10-ps
I went to try this:
Remove-AppxPackage -Package "59777724-81d4-406d-95d7-be70af1xxxxx" -AllUsers
or even this
Remove-AppxPackage -Package $fullName -user username
And yes, app name is a GUID - I inherit this and its fine by me.
Also, this is a side load app.
Now... regardless I use both "-AllUsers"
or "-user someUser"
the app is been removed but only for the the current, not all or the one I specified.
Any help on this?
Update If I try this
Remove-AppxPackage -Package $AppDisplayName -AllUsers
I had an error, saying the package is not found. (Excepção de HRESULT: 0x80073CF1)
If I try:
Remove-AppxPackage -Package $AppDisplayName -User username
I had the error that id structure is invalid.
Just on the chance to clarify my comment (without testing by me) try this in Powershell run as Administrator
Get-AppxPackage -Allusers -Package "59777724-81d4-406d-95d7-be70af1xxxxx" | Remove-AppxPackage
Get-AppxProvisionedPackage –Online -Package "59777724-81d4-406d-95d7-be70af1xxxxx"| Remove-AppxProvisionedPackage –Online
User contributions licensed under CC BY-SA 3.0