According to the help document of REMOVE-APPXPACKAGE, I inquired about the explanation of the parameter -ALLUSERS.
According to the help document, "This cmdlet works off the parent package type. If it is a bundle, use -PackageTypeFilter and specify the bundle. To use this parameter, you must run the command by using administrator permissions."
I think yours The application package may meet one of the above two conditions, or you are not logged in using administrator permissions.
If you have any new concerns, please contact us.
Powershell remove app package (Remove-AppxPackage -Allusers) gives error
Hello I am trying to uninstall some windows apps by using PowerShell however I am bumping into an error when I use a specific parameter.
I start a new PowerShell prompt as administrator and type:
Get-AppxPackage | Where-Object {$_.PackageFullName -like "*solitaire*"} | Remove-AppxPackage -Allusers
This results in the following error output:
When I run the exact same command only without the -Allusers parameter. The removal is successful
The app is gone.
Why does specific parameter raise an error? Does somebody know?
Powershell: 5.1.19041.1
Windows 10 Pro
-
Young Yang (Shanghai Wicresoft Co,.Ltd.) 661 Reputation points
2020-08-13T01:33:27.11+00:00
2 additional answers
Sort by: Most helpful
-
Rob Nicholson 66 Reputation points
2020-08-28T09:15:14.037+00:00 This is a breaking change in Windows v2004 - thanks Microsoft....
-
Ken Jones 1 Reputation point
2022-02-10T17:35:16.727+00:00 new PowerShell prompt as administrator
Missing one -Allusers
To list installed packages Get-appxpackageexample to get remove one package
Get-appxpackage -PackageTypeFilter Main, Bundle, Resource -Allusers Mixed| Remove-AppxPackage -AllUsers