Did something change with this function?
If I want my script to explicitly exit with Exit-Code 3010 (soft reboot) so that SCCM shows that reboot is required, it doesn’t work.
It doesn’t work if I set $mainExitCode = 3010
Or by running:
Exit-Script -ExitCode 3010
Also no change if I set the variable
$msiRebootDetected = $true
I’ve tried this with PSADT 3.8.0 and with 3.7.0
I’ve added my own log entries to check what the exit code should be.
In the log I can clearly see that “$mainExitCode” is “3010” because I’ve set it.
But script still exists with zero (0)
[Post-Uninstallation] :: Main Exit Code should be 3010. Main Exit Code is: 3010 (<- from variable $mainExitCode)
[Post-Uninstallation] :: SymantecEndpointProtectionUninstall Uninstallation completed with exit code .
What is going on here?