The Orchestrator integration in MDT 2012 Update 1 is my new toy for this week, it feels like Christmas when you where a little kid you want to play around with it all the time, have it next to the bed at night!
I wrote a blog post a couple of days ago on how to use the Orchestrator integration in MDT 2012 Update 1 to remove the computer from a Collection after a successful OS deployment.
I wrote in that post that you could use it to send an email if the deployment is not successful and it is just as simple. The end result will look like this, where we include the computername and as it is possible to pass variables on to Orchestrator we also use the setting for where the Log files are located for the failed OS deployment.
Here is how to do it:
- Configuration Manager 2012 site configured for OSD
- MDT 2012 Update 1
- The Network Access account need to have permissions to execute the Runbook
3. The Send Email step has the following settings in the text, it is necessary to configure SMTP server settings on the other tabs as well. To use the variables in the subject and message use right-click and select Subscribe / Published Data and select “OSDComputerName” in the list so the same in the Message box where we also include the path to the log file as well.
4. In the SCCM 2012 MDT Task sequence we add a step in the end of the Task Sequence under the “Gather Logs and StateStore on Failure” with the following settings and again it is so easy, just type in the Orchestrator servername and you will be presented with a list of Runbooks to chose from. Chose the one we created and add the following variables to pass on to it.
If you need to fail the task sequence for testing add a run command line running a vbscript with the following content, which will simply return an exit code of 1. Which indicates a failure.
Next up create an incident in Service Manager if the OS deployment fails which is also really easy to do.
Start testing it yourself!