Email Notification at the end of a SCCM OSD Task Sequence

TGH Profile Image 512x512

I have been working on a method to send our helpdesk an email notification when an OSD task sequence has completed.

I started by looking into using the Status Filters and Powershell but this didn’t seem to work well enough for what I wanted to do, which was to create a fancy looking email by using HTML for the outputed email.

So, I decided that as I have MDT integrated into my SCCM environment, I could use the Execute Runbook step and design a solution in Orchestrator.

To do this, I created a new runbook in Orchestrator with two very simple steps, Initialize Data and Send Email and then link them together…

In the Initialize Data part, I added the OSDComputerName variable so that I could use that information in my email to be sent….

I’m not going to share my email settings as these are very personalised to almost every different setup so you can setup your own settings under the Send Email options, but remember that you can use HTML to design our email and you can use the Published Data to input the OSDComputerName of the machine that is being built by the task sequence where you will execute this runbook.

Once you have your runbook setup and you have checked it in, you can now edit your SCCM OSD task sequence. You should add your Execute Runbook right at the end of your task sequence (remember to add the Use MDT Toolkit Package step before you run the Execute Runbook step)…

As you can see from above, after you have added your Use MDT Toolkit Package, you should then add the Execute Runbook step (you can then rename it something more appropriate like I have above) and enter the settings like below:

As you can see, I’ve blocked out my Orchestrator Server but you obviously enter your own server name here. You can then browse to your runbook which will then give you the option to specify the OSDComputerName variable which should be entered as:

 %_SMSTSMachineName%  

You can then save your task sequence and when you run the process, at the end it should send the email you created under the Send Email option in Orchestrator.

If you have any questions about this process, leave a comment and I’ll get back to you when I can.


You might also like...

Leave us a message...

This site uses Akismet to reduce spam. Learn how your comment data is processed.