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" "Clipchamp.Clipchamp"
) )
function Remove-InstalledAppxPackage { function Invoke-InstalledAppxPackageRemoval {
param( param(
[string]$Pattern [string]$Pattern
) )
@@ -69,7 +69,7 @@ function Remove-InstalledAppxPackage {
} }
} }
function Remove-ProvisionedAppxPackage { function Invoke-ProvisionedAppxPackageRemoval {
param( param(
[string]$Pattern [string]$Pattern
) )
@@ -101,7 +101,7 @@ function Remove-ProvisionedAppxPackage {
} }
} }
function Remove-OneDrive { function Invoke-OneDriveRemoval {
$Installers = @( $Installers = @(
"$env:SystemRoot\System32\OneDriveSetup.exe", "$env:SystemRoot\System32\OneDriveSetup.exe",
"$env:SystemRoot\SysWOW64\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 "" Write-Host ""
foreach ($Pattern in $PackageNamePatterns) { foreach ($Pattern in $PackageNamePatterns) {
Remove-InstalledAppxPackage -Pattern $Pattern Invoke-InstalledAppxPackageRemoval -Pattern $Pattern
Remove-ProvisionedAppxPackage -Pattern $Pattern Invoke-ProvisionedAppxPackageRemoval -Pattern $Pattern
Write-Host "" Write-Host ""
} }
if ($IncludeOneDrive) { if ($IncludeOneDrive) {
Remove-OneDrive Invoke-OneDriveRemoval
} }
else { else {
Write-Host "OneDrive was not removed. Re-run with -IncludeOneDrive to call the built-in OneDrive uninstaller." -ForegroundColor Yellow Write-Host "OneDrive was not removed. Re-run with -IncludeOneDrive to call the built-in OneDrive uninstaller." -ForegroundColor Yellow