Send Mail if there is an error in Task-Sequence

Target: Send mail / smsts.log if there is an error in a task-sequence to support or helpdesk

In one of my previous post I discripted howto “Copy the smsts.log to a network share during a task-sequence if there is any error in the task-sequence” -> I modified the last step -> to send a mail directly to the helpdesk if there was an error in the task-sequence.

I wrote a small GUI that will be shown if there was an error in a task-sequence. The tool automatically pre-fills the subject with the computername / the mail to from the config file and the mail-body.

This is the view in the task-sequence once an error occurs:

1

2

And the result in the mailbox of the helpdesk / or in the ticket system:

3

Download the tool from the following link: click here

The download includes the .exe file and a config xml file:

4

You need to adapt the config.xml with your configuration details:

5

Enter your smtp server with the port. Enter the mail details from: to:

If you set active to “no” that would mean that your SMTP-Server accepts mails from anonymous. In that case you can skip the username and password in the Config.xml

Enter the logshare name -> the once that is configured in the “Connect to Network Folder” step in the task-sequence.

Afterwards place both files in a package and deploy it to the required distribution-points and add the following step in the task-sequence in the part “Log Capture”:

6

7

There is one prerequisite – you need to active Windows Powershell Support in your boot image configured in the task-sequence.

8

Advertisement

Copy smsts.log automatically on a network share if error in OSD

Target: Copy the smsts.log to a network share during a task-sequence if there is any error in the task-sequence / except the option “Continue on error” is set.

Sometimes it can be hard if you request an smsts.log from a location where you don’t have real IT on side.
You need to know at which step the installation process stopped. During OSD, if the disk is already partitioned, within Windows or before, if it’s a x64 system or x86….

There is the possability to copy the logs automatically to a network share. I exported the example Task-Sequence which can be downloaded here: Download

You only need to copy the .zip file on an network share and import the task-sequence in the ConfigMgr Console.

The example Task-Sequence includes the following steps:

This will do the following if you have an error in the task-sequence.

On the file-share you will have a folder with the device name:

And inside the folder the smsts.log:

All steps more detailed:

In my productive TS all steps are one level / folder under the “Task Sequence” step:

Steps:

1. Log Capture:

Options of this step:

2. Connect to Network Folder / create a network-share before with everyone at least write access.

3. Create folder on the share for Computer

4. Copy the smsts.log to the share directory

5. Display a Popup that there was an error and you need to check the logs.

Error message during failure in OSD:

I found the source / Idea on the following Blog-Post: https://systemcenterguru.wordpress.com/2013/11/02/capturing-task-sequence-log-files-during-osd-deployment/