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, 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:
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.
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.
No need to worry, we will not be filling your inbox with spam and you can unsubscribe anytime you like.