trying to uninstall my uwp using powershell

0

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.

powershell
uwp
asked on Stack Overflow Mar 17, 2018 by dr.Xis • edited Mar 18, 2018 by dr.Xis

1 Answer

3

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
answered on Stack Overflow Mar 17, 2018 by Mark Schultheiss

User contributions licensed under CC BY-SA 3.0