Menu
CCMEXEC.COM – Enterprise Mobility
  • Home
  • General
  • Configuration Manager
  • Windows 10
  • Intune
  • GitHub
  • Windows 11
  • About the author
CCMEXEC.COM – Enterprise Mobility

ConfigMgr 2012 + MDT 2012 Update1 + Orchestrator = Magic!

Posted on September 29, 2012 by Jörgen Nilsson

I finally got around testing the new Orchestrator Task in MDT 2012 Update 1 and wow is the word that comes into mind!

I thought well I will do two simple tests to see how it works, now I am hooked. I added two Orchestrator tasks in my OS Deployment Task Sequence the first step will remove the computer from the OSD Collection when it is completed and the other step will send an E-Mail if the OS deployment fails.

Two fairly simple tasks but think about the possibilities, updating the Service Request for re-installing a computer in Service Manager with status on where the installation is, adding a computer dynamically to a asset system or counting the number of time a computer is being re-installed which can be useful for seeing trends and identifying problems with models e.t.c.

Here is how to create a Runbook to remove the computer from a Collection after a successful OS deployment, which is something fairly often scripted today:

Environment prerequisites:

  • Configuration Manager 2012 site configured for OSD
  • MDT 2012 Update 1
  • The Network Access account need to be a Orchestrator User

1. In the Orchestrator Runbook designer I created a Runbook with the two following steps:

MDT_Orch22. Add a variable to the Initialize Data step like this:

MDT_Orch33. Create  a new step using the Delete Collection Rule activity from the System Center 2012 Configuration Manager Integration Pack. It defaults to “Direct” instead of “Direct Rule” so remember to change that. When creating the Membership rule right-click and select Subscribe / Published Data and select “Computername” in the list.

MDT_Orch44. Test the Runbook and Check it in after testing it successfully.

5.Create a new step in the SCCM/MDT Task Sequence like the one below, it is really simple type in the name if the Orchestrator server and press Browse then you will be able to browse all runbooks available on the Orchestrator server. The UI will find that the Runbook requires input, in this case in the form of Computername so you can select to pass a variable along.

MDT_Orch1That is it, incredibly easy!
You are now ready to test out your Runbook integration. Don’t forget to configure security in Orchestrator so you have permission to execute the Runbook

Here is a another example on how to use the Orchestrator integration from Peter van der Woude, which display how to move the computer to the correct OU after deployment, which is another popular thing to script. http://www.petervanderwoude.nl/post/using-the-power-of-orchestrator-to-move-a-computer-to-a-different-ou-via-configmgr-2012/

So now we can use Runbooks instead of doing a lot of scripting in our deployment solutions!! However when you want to do more advanced things you will need sooner or later write your own Powershell script to achieve this, so scripting is still needed don’t worry 😉

5 thoughts on “ConfigMgr 2012 + MDT 2012 Update1 + Orchestrator = Magic!”

  1. Pingback: Use MDT 2012 Update 1 to run System Center Orchestrator 2012 Runbooks « Deploy OS
  2. Pingback: Using a Status Filter Rule to delete a collection membership via Orchestrator and ConfigMgr 2012 | Nothing but ConfigMgr
  3. Morten Frederiksen says:
    November 18, 2014 at 12:24 pm

    Hi Jorgen

    We so much want to use Orchestrator but we can’t figure out what we are missing.

    When we run the taskt seq we get this error:

    “The task sequence execution engine failed executing the action (Remove PC from Collection) in the group (New Group) with the error code 10801
    Action output: … 9-1″/>
    401 – Unauthorized: Access is denied due to invalid credentials.

    Server Error

    401 – Unauthorized: Access is denied due to invalid credentials.
    You do not have permission to view this directory or page using the credentials that you supplied.. The operating system reported error 1: Incorrect function. ”

    Please help

    Best regards
    Morten

    Reply
    1. Jörgen Nilsson says:
      November 27, 2014 at 6:59 am

      Hi,
      Sorry for the extremely late answer.
      It sounds like the account you run the exectue the runbook are not the correct one. make sure that the account you execute the runbook with has the permissions needed.
      If you don’t use “Run as the following user” then it is executed with the Network access account.
      /Jörgen

      Reply
  4. Morten Frederiksen says:
    December 1, 2014 at 11:23 am

    Hi,

    It’s okay 🙂

    In the task seq. it’s not possible to do “Run as” on task “Execute Runbook”?

    Or are we doing something wrong?

    /Morten

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

My name is Jörgen Nilsson and I work as a Senior Consultant at Onevinn in Malmö, Sweden. This is my blog where I will share tips and stuff for my own and everyone elses use on Enterprise Mobility and Windows related topics.
All code is provided "AS-IS" with no warranties.

Tweets by ccmexec

Recent Posts

  • Windows Servicing, Personal Teams and Success.cmd
  • Windows MDM Security Baseline – Settings Catalog
  • Configuring MS Edge Security Baseline v107 using Settings Catalog
  • Configuring Desktop App Installer using CSP and script?!
  • Customizing Taskbar and Start in Windows 11 22h2 with PowerShell

©2023 CCMEXEC.COM – Enterprise Mobility | WordPress Theme by Superb Themes
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT