major change to override Write-Error func

This commit is contained in:
2023-10-05 13:17:18 -04:00
parent bbb4884818
commit 5f4b4565de
42 changed files with 114 additions and 114 deletions
+2 -2
View File
@@ -61,14 +61,14 @@ If ( IsWindowsBuild -ge 9200 )
If ($PackageFullName) {
Write-Output “Removing package: ${PackageFullName}”
Try { Remove-AppxPackage -Package $PackageFullName }
Catch { LogErr $_.Exception.Message }
Catch { Write-Error $_.Exception.Message }
}
# If the provisioned package exists, uninstall it
If ($ProPackageFullName) {
Write-Output “Removing provisioned package: ${ProPackageFullName}”
Try { Remove-AppxProvisionedPackage -PackageName $ProPackageFullName -Online -AllUsers }
Catch { LogErr $_.Exception.Message }
Catch { Write-Error $_.Exception.Message }
}
}
} Else { Write-Output "Cannot remove Appx packages because this endpoint is not running Windows 8 or higher" }