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):
Here is a sample email from 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.
Johan, I'd like to have this send a notice to a user at the end of an application installation task sequence. So, a user initiates a TS from Software Center, and it then installs several apps and reboots the machine. Before it reboots, I'd like it to send an email to that user letting them know that the system has finished and rebooted. Do you know how I can have the TS look up the users email? I presume we would have to do an LDAP query against AD to pull the email, but not really sure how to query… Read more »
I would do that via a web service to avoid client side scripting for this information.
Johan i am trying to implement this script as it is pretty cool. i am getting an error on line 46, 31 windows script host: unrecognized markup. suggestions on how to fix that?
Sorry, haven't seen that vbscript error before
Hi Johan, is this script available for download?
Sorry for the delay, it took me a while to hunt it down. Here is the script: https://github.com/DeploymentResearch/DRFiles/blob/master/Scripts/ZTI-SendEmail.wsf (I've updated the blog post too).