Creating an OS Deployment Summary Email with Orchestrator

System Center Orchestrator is very useful as complementary tool to OS Deployment.  I use it for several things during deployment including adding computers to SCCM collections, adding computers to AD groups, moving computer accounts into different AD OUs, adding a description to the computer account etc.  Previously, I had to use scripts to accomplish those things.  One other thing I also find useful is sending emails at different stages during the deployment, for example when it starts, if it fails or is cancelled and when it completes.  I like to send a deployment summary email at the beginning of the deployment that uses the task sequence variables to give me various data about the deployment.  It’s quite easy to set up, and in this post I’ll explain how to do it.  I’ll assume you’re familiar with creating basic Orchestrator runbooks.

Decide What to Include in Your Email

In my email, I include the values for some default task sequence variables and some additional ones that I’ve created and populated using the UDI Wizard.  Since only IT admins run our OS Deployments, we use the UDI wizard to get some information into the deployment.  I created a custom UDI wizard page that gets data for some custom TS variables, such as the architecture of the OS being deployed, whether the HDD will be encrypted, which disk partition is being installed to, etc.  Of course, you don’t need to use the UDI wizard, there are other ways to get custom variables into the deployment if you need to.

To get an export of all TS variables available to you during the deployment, use Daniel Oxley’s VBScript found here.

Create a Runbook

Create a new runbook and add an ‘Initialize Data’ activity from the Runbook Control group and a ‘Send Email’ activity from the Email group.  Both of these activities are native to Orchestrator and don’t require any additional Integration Packs. Create a simple link between the two.

runbook1

Initialize Data

Double-click the ‘Initialize Data’ activity to edit it.  Click ‘Add’, and enter a TS variable name that you want to include.  It should match the TS variable name exactly.  Do that for all the variables you want to add.

Here’s a list of the ones I use:

_SMSTSPackageName
DartIP001
DartPort001
DaRTShortCut
DartTicket
DeploymentType
HDDEncrypt (custom)
IPAddress001
IsDesktop
IsLaptop
MacAddress001
Make
Memory
Model
OSArch (custom)
OSDComputerName
OSDeployer (custom)
OSDStartTime
OSDWindowsPartition (custom)
ProcessorSpeed
SerialNumber
SLSHARE
SLSHAREDYNAMICLOGGING

You can see that some of the variables are custom ones, and the DaRT ones are only available if you have integrated DaRT in your boot image and have activated a remote connection (I do that automatically with a Prestart command in the boot image).

initSend Email

Next, double-click the ‘Send Email’ activity to edit it.  On the Connect page, enter the Sender email address and the smtp server.

ex

On the Details page, enter a subject for your email.  Right-click in the subject field and choose ‘Expand’ so you can see all the text.  I’ve included the OSDComputerName and OSDStartTime variables in the subject by right-clicking, choosing Subscribe > Published Data and selecting the parameters from the Initialize Data activity.

subject

pub

Add a recipient email address.  Since I want to send the email to the IT admin who is deploying the machine, I use a custom variable ‘OSDeployer’ populated by the admin in the UDI wizard, adding it via the Published Data as before.  I also bcc myself 🙂

recipient

Next, enter the body of the email in the message field.  I use the Published Data again to add the parameters I want:

messageSave the runbook, then head over to your SCCM/MDT server.  Edit your Deployment task sequence and add an ‘Execute Runbook’ step from the menu.  Be sure to add it after a ‘Gather’ step and before a ‘Reboot Computer’ step, so all the variables are present in the TS environment.  Enter the name of your Orchestrator server and click Browse to choose the runbook.  As long as your parameters are named identically to the TS variables, you can choose the ‘Automatically provide runbook parameter values’ option.  Be sure to also check ‘Wait for the runbook to finish before continuing’, or the email won’t be sent.

ts

The result

We get an email containing useful information about the deployment once it is kicked off, including a link to the DaRT Remote Session and the location of log files for that machine 🙂email
Orchestrator can be a great tool to help your OS deployments, and creativity is your main limitation!

Advertisements

2 thoughts on “Creating an OS Deployment Summary Email with Orchestrator

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s