locked
If task sequence fails - run action RRS feed

  • Question

  • So I have created an email that sends at the end of the task sequence.  It serves to confirm for the tech that it has completed and gives a full summary of the hardware and deployment.   What I want to do is also hae the email run if the task seqeunce fails.    Does MDT have any solution for "action if fail"?   I essentially want that email whether it succeeds or fails.

    I have thought to start a process that waits for the TS to end and run once it has ended but this seems error prone.   Any other ideas?

    Wednesday, October 9, 2013 8:35 PM

Answers

  • Either modify the litetouch.wsf script to perform what you are asking.

    Or write a web service to read "events" issued by MDT, and process the following event:

    oLogging.CreateEvent 41014, LogTypeError,

    "Litetouch deployment failed, Return Code = "& PrnErrValue ( iRetval ), Array(CStr(iRetVal))


    Keith Garner - keithga.wordpress.com

    • Proposed as answer by Keith GarnerMVP Wednesday, October 9, 2013 11:39 PM
    • Marked as answer by roberts0515 Thursday, October 10, 2013 2:18 AM
    Wednesday, October 9, 2013 11:39 PM

All replies

  • Either modify the litetouch.wsf script to perform what you are asking.

    Or write a web service to read "events" issued by MDT, and process the following event:

    oLogging.CreateEvent 41014, LogTypeError,

    "Litetouch deployment failed, Return Code = "& PrnErrValue ( iRetval ), Array(CStr(iRetVal))


    Keith Garner - keithga.wordpress.com

    • Proposed as answer by Keith GarnerMVP Wednesday, October 9, 2013 11:39 PM
    • Marked as answer by roberts0515 Thursday, October 10, 2013 2:18 AM
    Wednesday, October 9, 2013 11:39 PM
  • Thanks Keith.

    I also have this request. We have the requirement to hide the summary at the end to allow automated lite touch deployments to start post-deployment processes so several deployments aren't monitored. Our teams claim that some deployments fail, although the majority of the time it is from user error. I am them more aware of log checking and how the process works, but an event to the Event Viewer or something would be helpful - thats kind of along the lines of what I was thinking.

    Writing a web service isn't my cup of tea. We don't use the database either - just the customsettings.ini. Would there be a crafty way to write an event to the Event Viewer that can be tagged?

    Friday, December 20, 2013 9:08 PM
  • Sure, go right ahead.


    Keith Garner - keithga.wordpress.com

    Monday, December 30, 2013 4:27 AM