There are many reasons we may identify issues with apps installed and managed by the Microsoft Store - this is how to find and remove them.
We often find Microsoft Store-based issues, and for the most common of those, we have listed some commands below to remove these issues.
All of the code below is based on the following two key code snippets:
To find out if an app exists on the device, and what versions are installed:
(Replace {appname} with your app - for example, Microsoft.MSPaint)
Get-AppxPackage {appname} -allusers
And then to remove the app, from all users, as its often on users you cannot access or the SYSTEM profile, we can pipe "|" the command results from the above into the remove command:
Get-AppxPackage {appname} -allusers | Remove-AppxPackage -allusers
Sometimes you may also need to address issues in the staging or other area's where the following command works well.
Get-AppXProvisionedPackage -online | % {if ($_.DisplayName -eq "{appname}") {$_}} | Remove-AppxProvisionedPackage -online
We have provided several commands below for those issues we continue to find. You only need to copy and paste them into an Administrative PowerShell Terminal Session.
List installed packages
Get-AppxPackage -AllUsers | Select Name, Version
List Provisioned packages
get-appxprovisionedpackage -online |select packagename
Typical Issues: Removal Commands
Microsoft Paint 3D
Get-AppxPackage Microsoft.MSPaint -allusers | Remove-AppxPackage -allusers
Get-AppXProvisionedPackage -online | % {if ($_.DisplayName -eq "Microsoft.MSPaint") {$_}} | Remove-AppxProvisionedPackage -online
Microsoft 3D Viewer
Get-AppxPackage Microsoft.Microsoft3DViewer -allusers | Remove-AppxPackage -allusers
Get-AppXProvisionedPackage -online | % {if ($_.DisplayName -eq "Microsoft.Microsoft3DViewer") {$_}} | Remove-AppxProvisionedPackage -online
HVEC Video Extension
Get-AppXPackage Microsoft.HEVCVideoExtension -allUsers | Remove-AppXPackage -allUsers
WEBP Image Extension
Get-AppXPackage Microsoft.WebpImageExtension -allUsers | Remove-AppXPackage -allUsers
HEIF Image Extension
Get-AppXPackage Microsoft.HEIFImageExtension -allUsers | Remove-AppXPackage -allUsers
Microsoft Office Hub
Get-AppXPackage Microsoft.MicrosoftOfficeHub -allUsers | Remove-AppXPackage -allUsers
VP9 Video Extensions
Get-AppXPackage Microsoft.VP9VideoExtensions -allUsers | Remove-AppXPackage -allUsers
Example Specific Command to remove a package
Remove-AppxPackage Microsoft.VP9VideoExtensions_1.0.22681.0_x64__8wekyb3d8bbwe
Example Code to Remove a Provisioned Package Completely
$app = get-appxprovisionedpackage -online |select packagename | where packagename -like "*MicrosoftOfficeHub*" -ErrorAction SilentlyContinue
if ($app){
$appname=$app.packagename
DISM /online /Remove-ProvisionedAppxPackage /PackageName:$appname
}else{
write-host "OfficeHub App not found or multiple versions?"
}