Over the years I have been using a few different scripts to have the task sequence send an email when the deployment is completed. For example this post: Configure MDT 2010 to send an email when deployment is completed. Another common way to do this is to use status filter rules in ConfigMgr. A good example is the Send an email when OSD completes a deployment post by Benoit Lecours.

Anyway, this week I've been implementing a ConfigMgr v1511 platform for a customer, and they wanted a small script that not only sent an email when deployment was done, but also parsed the log files for warnings and errors, and include them in the email. And since MDT Lite Touch already have much of that code built-in, it didn't take to long to customize it for ConfigMgr. The customer (thanks Erik and Joakim) also said yes to my request on posting this script for the community (after cleaning up some unique info):

Maybe not an email, but still 🙂

The Email

Here is a sample email from the script:

The Script

Simply add the script to your MDT package in ConfigMgr, modify the email address and server in it. Then add a Run Command Line action in the task sequence to call it.

Note: The script is a WSF script, so it needs the .wsf extension.

The script:

https://github.com/DeploymentResearch/DRFiles/blob/master/Scripts/ZTI-SendEmail.wsf