System Center 2012 SP1 Orchestrator: Getting Started with Configuration Manager 2012 Integration

Introduction

System Center 2012 SP1 Orchestrator is a tool to help automate enterprise processes. It stresses the reduction of code writing, which has its benefits, but also has its drawbacks. In my personal opinion, everyone should learn how to write code. These days, if you’re focused on the Microsoft platform, there is nothing better to learn than PowerShell. Knowing how to write code will help you to fill in gaps in the integration of two or more software products.

Given the wide array of functionality offered by System Center 2012 SP1 Configuration Manager, it would seem highly desirable to use Orchestrator to automate some of that functionality. You can perform functions such as:

  • Creating or deleting Collections
  • Invoke Collection membership evaluations
  • Add or remove Collection Membership Rules
  • Enumerate Collection members
  • Deploy Applications or Configuration Baselines
  • Invoke ConfigMgr client actions

In the next section, we’ll explore how to set up integration between Orchestrator and Configuration Manager.

Register and Deploy the Integration Pack (IP)

Orchestrator offers the ability to create “integration packs” (or IPs, not to be confused with IP addresses — haha) to extend the number of “Activities” that are available to be used inside of “Runbooks.” If you aren’t already familiar with Orchestrator, each “Runbook” is constructed from a variety of “Activity” objects, which typically offer a self-contained bit of functionality. Here are a few simple examples of “Activities” in addition to the ConfigMgr-specific ones listed in the “Introduction” section:

  • Send e-mail
  • Send event log message
  • Restart computer

Activities are joined together by “Smart Links,” which pass data down the data bus, from one Activity to the next. We won’t get too deep into discussing those for right now.

First, you’ll want to download and extract the System Center 2012 Service Pack 1 integration packs from here: http://www.microsoft.com/en-us/download/details.aspx?id=34611. The file name for the integration packs is obviously System_Center_2012_SP1_Integration_Packs.EXE. The other file available for download at that same URL is System_Center_2012_SP1_Orchestrator_Integration_ToolKit.exe, which provides documentation and tools necessary to create your own, custom integration packs.

Once you’ve downloaded the integration packs, you will need to register them with the Orchestrator Management Server. On your Orchestrator Management Server, open the Deployment Manager tool. If you aren’t already connected to your Management Server, then establish a connection to it by using the Actions –> Connect menu option.

clip_image001

On the left-hand side, you’ll see the Integration Packs node. Right-click it and select “Register IP with the Orchestrator Management Server.” Run through the “Integration Pack Registration Wizard” and finish the registration process.

clip_image003

After the Integration Pack has been register with your Orchestrator Management Server, you’ll need to deploy the IP to your Runbook Servers and Runbook Designers. Right-click the Integration Packs node again, and select “Deploy IP to Runbook Server or Runbook Designer.” Check off the “System Center Integration Pack for System Center 2012 Configuration Manager” and finish the remainder of the wizard by entering the computer name(s) and scheduled deployment time.

clip_image004

Integration Pack Configuration

After you’ve registered and deployed the Integration Pack for System Center 2012 Configuration Manager, you’ll need to configure the Integration Pack. You’ll need to specify the following information in the configuration for this IP:

  • Server name holding the ConfigMgr WMI provider role
  • Username to connect to the WMI provider
  • Password to connect to the WMI provider
  • A friendly name for the configuration

In order to complete this configuration process, open the Runbook Designer and select the Options –> SC 2012 Configuration Manager menu option. You’ll be presented a screen with an empty list of configuration settings. You can specify multiple configurations, if you have multiple ConfigMgr WMI providers that you will need to communicate with from your Runbook Activities. Click the Add button, and fill out the appropriate information in the “Connection Entry” form. Once you’ve completed this, you are ready to start using Configuration Manager activities in your Runbook!

clip_image005

Create Your First Orchestrator-ConfigMgr Runbook

After you’ve finishing registering, deploying, and configuring the Integration Pack, you’re ready to create your first Orchestrator Runbook using Configuration Manager functionality! Let’s go through an example of creating a Runbook that uses the ConfigMgr IP. Our example will simply create a new device Collection object, based on two data inputs: Name and Comment. We’ll also configure the Runbook to return the newly created Collection ID, so that it can feed that data into another Runbook, in the future.

Follow these steps in the Runbook Designer:

  1. Create a new Runbook that contains three Activities of types: Initialize Data, Create Collection, and Return Data
  2. Create a Smart Link from Initialize Data to Create Collection, from Create Collection to Initialize Data, and from Create Collection to Return Data
  3. In the Initialize Data step, add two custom input parameters like so:
    image
  4. In the Create Collection Activity properties, select your “Connection” that you set up during the previous section. After that, configure: Collection Name, Comment, and Limiting Collection. Make sure you set the Limiting Collection Value Type to Name, unless you manually populate the collection ID, otherwise it will fail.
    To subscribe to “Published Data” (data from farther up the data bus), you need to right-click the field you are editing, and select Published Data.
    image
  5. Next, in order to configure the Return Data, we first need to specify an output parameter for the Runbook. So, right-click the Runbook title and visit Properties. Add an output parameter called CollectionID per the screenshot below.
    image
  6. Now that we’ve configured an output parameter for the Runbook, go to the Return Data Activity properties, visit the Details section, and subscribe to Published Data for the CollectionID.
    imageimage
  7. Make sure that, when you’ve finished modifying the Runbook, you select the Check In button to commit your changes
    image

Once you’ve completed these steps, you can test out the Runbook!

Testing Your First ConfigMgr-Orchestrator Runbook

Now that we’ve completed the creation of a new Runbook, we need to test it out! Runbooks can be tested from the Runbook Tester utility (invoked from the Runbook Designer), but the Runbook Tester runs under your current session credentials, rather than the Runbook Server service credentials. Although the Runbook Tester is a good tool to debug your Runbooks, you’ll probably want to test out your Runbooks from the Orchestration Web Console, to ensure they’re running in a production-like scenario.

Follow these steps to test out your Runbook:

  1. Open Internet Explorer and navigate to the Orchestrator Silverlight Web Console (eg. http://scorch01.contoso.com:82)
    image
  2. Select the Create Collection Runbook and click on Start Runbook
  3. In the Start Runbook screen, enter the parameters for the Collection Name and Comment, and select the Runbook Server you’d like to execute it on, then click Start.
    image
  4. On the right-hand side of the Orchestrator Web Console, with the Create Collection Runbook selected, click on View Instances
  5. Select the most recent instance (typically on top), and click on View Details
    image
  6. Examine the results of the Runbook instance under the Overview, Input Parameters, and Output Parameters tabs. In particular, you should notice that under the Output Parameters tab, there is a single output parameter called CollectionID. This is the output parameter that we set up in the Runbook Properties, and the Return Data activity, so that we can feed that data back into another Runbook.
    image

Exporting the Runbook

You might want to export the Runbook, so you can import it into a different Orchestrator environment (eg. dev –> production), or to share your creation with the community. When exporting a Runbook, you will be provided a simple XML file with a .ois_export file extension. To export the Runbook, simply follow these steps:

  1. Open the Runbook Designer
  2. Navigate to the folder where your Runbook lives
  3. Right-click the Runbook heading and select Export

If you haven’t already, please sign up for the MyITforum Microsoft System Center Orchestrator mailing list, and involve yourself in the community. You can browse the e-mail lists here: http://myitforum.com/myitforumwp/services/email-lists/

Conclusion

I hope that this article has provided some insight into setting up Microsoft System Center 2012 SP1 Orchestrator to orchestrate tasks inside of Microsoft System Center 2012 SP1 Configuration Manager. Come up with your own Orchestrator Runbook creations, and be sure to share your cool ideas with the community.

  • http://twitter.com/pcgeek86/status/323450132681064449/ Trevor Sullivan (@pcgeek86)

    System Center 2012 SP1 Orchestrator: Getting Started with #ConfigMgr 2012 Integration http://t.co/Pewn3maT18 #sccm #sysctr #itpro #sysadmin

  • http://twitter.com/ggroeneweg/status/323509397764575232/ @ggroeneweg

    pcgeek86: System Center 2012 SP1 Orchestrator: Getting Started with #ConfigMgr 2012 Integration http://t.co/M2Gs8zdJ9C #sccm #sysctr

  • http://twitter.com/pcgeek86/status/323568982022041600/ Trevor Sullivan (@pcgeek86)

    System Center 2012 SP1 #Orchestrator: Getting Started with #ConfigMgr 2012 Integration #sccm #sysctr #itpro #sysadmin http://t.co/Pewn3maT18

  • http://twitter.com/pcgeek86/status/323765257619259392/ Trevor Sullivan (@pcgeek86)

    System Center 2012 SP1 Orchestrator: Getting Started with #ConfigMgr 2012 Integration http://t.co/Pewn3maT18 #sccm #sysctr #sysadmin #itpro

  • http://twitter.com/pcgeek86/status/324327751551176705/ Trevor Sullivan (@pcgeek86)

    System Center 2012 SP1 #Orchestrator: Getting Started with #ConfigMgr 2012 Integration http://t.co/Pewn3maT18 #sccm #sysctr #sysadmin #itpro