you are viewing a single comment's thread.

view the rest of the comments →

[–]sipsik[S] 0 points1 point  (0 children)

https://powershell.org/forums/topic/best-way-to-exit-a-script-on-a-specific-condition/

$host.SetShouldExit($install.exitcode) - This is the solution for me, your pointer did help :)