mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-02-04 15:00:09 +00:00
* Update Remove-WinUtilAPPX.ps1 * Modify Remove-WinUtilAPPX.ps1 to adjust package removal Removed '-AllUsers' parameter from Remove-AppxProvisionedPackage call. * Update Remove-WinUtilAPPX.ps1 * Fix formatting in Remove-WinUtilAPPX.ps1 * Update Remove-WinUtilAPPX.ps1
22 lines
517 B
PowerShell
22 lines
517 B
PowerShell
function Remove-WinUtilAPPX {
|
|
<#
|
|
|
|
.SYNOPSIS
|
|
Removes all APPX packages that match the given name
|
|
|
|
.PARAMETER Name
|
|
The name of the APPX package to remove
|
|
|
|
.EXAMPLE
|
|
Remove-WinUtilAPPX -Name "Microsoft.Microsoft3DViewer"
|
|
|
|
#>
|
|
param (
|
|
$Name
|
|
)
|
|
|
|
Write-Host "Removing $Name"
|
|
Get-AppxPackage $Name -AllUsers | Remove-AppxPackage -AllUsers
|
|
Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like $Name | Remove-AppxProvisionedPackage -Online
|
|
}
|