This is not recognized in 4.1.7 "Exit-Script -ExitCode " but works in 3.9.3.
using Close-ADTSession -ExitCode still continues with Post-Install resulting to install completed even though the pre install condition is False.
Has it been changed or removed completely?
exit also didn't work
Sample working in 3.9.3:
If ($foundPrereq) { installation of app starts } Else { show message -MessageAlignment 'Left' -ButtonRightText 'OK' -Icon Warning -NoWait | Exit-Script -ExitCode '-2016344205' }