Email Notification at the end of a SCCM OSD Task Sequence

sccm logo

Table of Contents

Last updated on March 30th, 2023 at 07:00 pm

Read Time:1 Minute, 58 Second

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.

Click to rate this post!
[Total: 0 Average: 0]

Free Subscription

If you want to be notified when we post more quality guides like this one, sign up to our free subscription service and you will receive an email when a new post is live.

Join 441 other subscribers.

No need to worry, we will not be filling your inbox with spam and you can unsubscribe anytime you like.


Leave us a message...

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