Levio
1
I am looking for a way to delete a Windows store app for all user profiles.
I tried this script but it is not really deleting the Appx app for all the profiles.
get-appxpackage Microsoft.VP9VideoExtensions* | remove-appxpackage -ErrorAction SilentlyContinue
# or
get-appxpackage -allusers Microsoft.HEVCVideoExtension* | remove-appxpackage -ErrorAction SilentlyContinue
# or
get-appxpackage -allusers Microsoft.HEVCVideoExtension* | remove-appxpackage -allusers -ErrorAction SilentlyContinue
Olaf
2
How is that question different to the one you asked yesterday?
Levio
3
Sorry. I was thinking that I did not post it. Sorry again.
Olaf
4
We use something similar to this:
Get-AppxProvisionedPackage -Online |
Remove-AppxProvisionedPackage -AllUsers
Levio
5
Thank you Olaf, but that is not a specific Appx.
Levio
6
I tried this but getting an error:
Get-AppxProvisionedPackage -Online |
select-object displayname, displayversion |
Select-Object -match Microsoft.WebpImageExtension |
Remove-AppxProvisionedPackage -AllUsers
Levio
7
I think this may work. I will try and see.
Get-AppxProvisionedPackage -Online |
select-object displayname, PackageName |
Where-Object {$_.PackageName -match 'Microsoft.HEVCVideoExtension'} |
Remove-AppxProvisionedPackage -AllUsers
Levio
8
My final script and it works.
$appname = @(
"Microsoft.WebMediaExtensions"
"Microsoft.MSPaint"
"Microsoft.VP9VideoExtensions"
"Microsoft.Microsoft3DViewer"
"Microsoft.HEIFImageExtension"
)
ForEach($app in $appname){
Get-AppxProvisionedPackage -Online | where {$_.PackageName -match $app} |
Remove-AppxProvisionedPackage -AllUsers -ErrorAction SilentlyContinue
}
Thank you Olaf!