none
Force MDT Task Sequence to Stop/Exit/Fail on App install failure

    Question

  • Hey all,

    I have deployment that installs many applications, most of which are wrapped in PowerShell scripts.  If there's any errors in the script I exit with some number other than 0 or 3010, usually odd integers (1,3,5,etc).  My problem is that when an (any) app install fails, the task sequence continues on until the end, then reports all the "errors" with a yellow Finish summary page.  None of these apps are marked "continue on exit".

    I want a failed application install to immediately halt and exit the Task sequence, specifically with a red summary screen if possible.  I haven't been able to find any info on this anywhere else online, so I figured I'd ask a bunch of way smarter people.

    Thanks all!

    Friday, December 13, 2013 7:59 PM

Answers

  • Yes, the behavior you see above is by design.

    More recent builds of MDT have a property called ApplicationSuccessCodes, where you can define a space delimited list of exit codes that are allowed for installation.

    I would not do this however, instead write your powershell script to return a "exit 0" upon success.


    Keith Garner - keithga.wordpress.com

    Friday, December 13, 2013 10:58 PM

All replies

  • Are you calling the scripts using a Run PowerShell Script task or have you made them MDT applications?

    -Nick O.

    Friday, December 13, 2013 8:38 PM
  • They are actual MDT "Applications".  The command line is "Powershell.exe -File ScriptName.ps1".

    Edit: I totally forgot to specify in the original post, but this is MDT 2010.

    • Edited by JT_Dominos Friday, December 13, 2013 9:47 PM
    Friday, December 13, 2013 9:46 PM
  • Yes, the behavior you see above is by design.

    More recent builds of MDT have a property called ApplicationSuccessCodes, where you can define a space delimited list of exit codes that are allowed for installation.

    I would not do this however, instead write your powershell script to return a "exit 0" upon success.


    Keith Garner - keithga.wordpress.com

    Friday, December 13, 2013 10:58 PM