major change to override Write-Error func
This commit is contained in:
@@ -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" }
|
||||
|
||||
Reference in New Issue
Block a user