Fix Appx removal helper names

This commit is contained in:
2026-05-24 09:09:42 +02:00
parent 2d1c339259
commit a314e7a3a1
+6 -6
View File
@@ -41,7 +41,7 @@ $PackageNamePatterns = @(
"Clipchamp.Clipchamp"
)
function Remove-InstalledAppxPackage {
function Invoke-InstalledAppxPackageRemoval {
param(
[string]$Pattern
)
@@ -69,7 +69,7 @@ function Remove-InstalledAppxPackage {
}
}
function Remove-ProvisionedAppxPackage {
function Invoke-ProvisionedAppxPackageRemoval {
param(
[string]$Pattern
)
@@ -101,7 +101,7 @@ function Remove-ProvisionedAppxPackage {
}
}
function Remove-OneDrive {
function Invoke-OneDriveRemoval {
$Installers = @(
"$env:SystemRoot\System32\OneDriveSetup.exe",
"$env:SystemRoot\SysWOW64\OneDriveSetup.exe"
@@ -131,13 +131,13 @@ Write-Host "This can affect existing users and the default package set for new u
Write-Host ""
foreach ($Pattern in $PackageNamePatterns) {
Remove-InstalledAppxPackage -Pattern $Pattern
Remove-ProvisionedAppxPackage -Pattern $Pattern
Invoke-InstalledAppxPackageRemoval -Pattern $Pattern
Invoke-ProvisionedAppxPackageRemoval -Pattern $Pattern
Write-Host ""
}
if ($IncludeOneDrive) {
Remove-OneDrive
Invoke-OneDriveRemoval
}
else {
Write-Host "OneDrive was not removed. Re-run with -IncludeOneDrive to call the built-in OneDrive uninstaller." -ForegroundColor Yellow