Files
winutil/functions/private/Remove-WinUtilAPPX.ps1
T

22 lines
517 B
PowerShell
Raw Normal View History

+3
2023-03-07 12:28:00 -08:00
function Remove-WinUtilAPPX {
<#
2023-10-19 17:12:55 -05:00
.SYNOPSIS
Removes all APPX packages that match the given name
+3
2023-03-07 12:28:00 -08:00
2023-10-19 17:12:55 -05:00
.PARAMETER Name
The name of the APPX package to remove
.EXAMPLE
+3
2023-03-07 12:28:00 -08:00
Remove-WinUtilAPPX -Name "Microsoft.Microsoft3DViewer"
2023-10-19 17:12:55 -05:00
+3
2023-03-07 12:28:00 -08:00
#>
param (
$Name
)
2026-01-08 20:29:55 +02:00
Write-Host "Removing $Name"
Get-AppxPackage $Name -AllUsers | Remove-AppxPackage -AllUsers
Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like $Name | Remove-AppxProvisionedPackage -Online
}