Email Notification at the end of a SCCM OSD Task Sequence

sccm logo
SCCM Logo

Table of Contents

Estimated reading time: 2 minutes

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.

Instructions

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…

Email Notification at the end of a SCCM OSD Task Sequence 1

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

Email Notification at the end of a SCCM OSD Task Sequence 2

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)…

Email Notification at the end of a SCCM OSD Task Sequence 3
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:
Email Notification at the end of a SCCM OSD Task Sequence 4

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.

Feedback

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

Share this content:

Click to rate this post!
[Total: 0 Average: 0]
Avatar for Andrew Armstrong

About Andrew Armstrong

Founder of TechyGeeksHome and Head Editor for over 15 years! IT expert in multiple areas for over 26 years. Sharing experience and knowledge whenever possible! Making IT Happen.

View all posts by Andrew Armstrong

Leave a Reply

Your email address will not be published. Required fields are marked *