Share via


Use Orchestrator Runbooks with MDT 2013

Applies To: Windows 8.1

This topic will show you how to integrate Microsoft System Center 2012 R2 Orchestrator with the Microsoft Deployment Toolkit (MDT) 2013 to replace the existing web services that are used in deployment solutions.

MDT 2013 can integrate with System Center 2012 R2 Orchestrator, which is a component that ties the Microsoft System Center products together, as well as other products from both Microsoft and third-party vendors. The difference between using Orchestrator and “normal” web services, is that with Orchestrator you have a rich drag-and-drop style interface when building the solution, and little or no coding is required.

Note

If you are licensed to use Orchestrator, we highly recommend that you start using it. To find out more about licensing options for System Center 2012 R2 and Orchestrator, visit the System Center 2012 R2 website.

In this topic

  • Orchestrator terminology

  • Create a sample runbook

  • Test the demo MDT runbook

  • Use the MDT demo runbook from MDT 2013

  • Run the orchestrator sample task sequence

See also

Orchestrator terminology

Before diving into the core details, here is a quick course in Orchestrator terminology:

  • Orchestrator Server. This is a server that executes runbooks.

  • Runbooks. A runbook is similar to a task sequence; it’s a series of instructions based on conditions. Runbooks consist of workflow activities; an activity could be “Copy File,” “Get User from Active Directory,” or even “Write to Database.”

  • Orchestrator Designer. This is where you build the runbooks. In brief, you do that by creating an empty runbook, dragging in the activities you need, and then connecting them in a workflow with conditions and subscriptions.

  • Subscriptions. These are variables that come from an earlier activity in the runbook. So if you first execute an activity in which you type in a computer name, you can then subscribe to that value in the next activity. All these variables are accumulated during the execution of the runbook.

  • Orchestrator Console. This is the Microsoft Silverlight-based web page you can use interactively to execute runbooks. The console listens to TCP port 81 by default.

  • Orchestrator web services. These are the web services you use in the Microsoft Deployment Toolkit to execute runbooks during deployment. The web services listen to TCP port 82 by default.

  • Integration packs. These provide additional workflow activities you can import to integrate with other products or solutions, like the rest of Active Directory, other System Center 2012 R2 products, or Microsoft Exchange Server, to name a few.

Note

To find and download additional integration packs, see Integration Packs for System Center 2012 – Orchestrator.

Create a sample runbook

This section assumes you have Orchestrator 2012 R2 installed on a server named OR01. In this section, you create a sample runbook, which is used to log some of the MDT deployment information into a text file on OR01.

  1. On OR01, using File Explorer, create the E:\Logfile folder, and grant Users modify permissions (NTFS).

  2. In the E:\Logfile folder, create the DeployLog.txt file.

Note

Make sure File Explorer is configured to show known file extensions so the file is not named DeployLog.txt.txt.

![](images\Dn744291.7b5b0df1-a02f-40a8-baa1-356412141a38(WS.11).png) Figure 23. The DeployLog.txt file.  
  
  1. Using System Center 2012 R2 Orchestrator Runbook Designer, in the Runbooks node, create the 1.0 MDT folder.

    Figure 24. Folder created in the Runbooks node.

  2. In the Runbooks node, right-click the 1.0 MDT folder, and select New / Runbook.

  3. On the ribbon bar, click Check Out.

  4. Right-click the New Runbook label, select Rename, and assign the name MDT Sample.

  5. Add (using a drag-and-drop operation) the following items from the Activities list to the middle pane:

    1. Runbook Control / Initialize Data

    2. Text File Management / Append Line

  6. Connect Initialize Data to Append Line.

    Figure 25. Activities added and connected.

  7. Right-click the Initialize Data activity, and select Properties

  8. On the Initialize Data Properties page, click Add, change Parameter 1 to OSDComputerName, and then click Finish.

    Figure 26. The Initialize Data Properties window.

  9. Right-click the Append Line activity, and select Properties.

  10. On the Append Line Properties page, in the File text box, type E:\Logfile\DeployLog.txt.

  11. In the File encoding drop-down list, select ASCII.

  12. In the Append area, right-click inside the Text text box and select Expand.

    Figure 27. Expanding the Text area.

  13. In the blank text box, right-click and select Subscribe / Published Data.

    Figure 28. Subscribing to data.

  14. In the Published Data window, select the OSDComputerName item, and click OK.

  15. After the {OSDComputerName from "Initialize Data"} text, type in has been deployed at and, once again, right-click and select Subscribe / Published Data.

  16. In the Published Data window, select the Show common Published Data check box, select the Activity end time item, and click OK.

    Figure 29. The expanded text box after all subscriptions have been added.

  17. On the Append Line Properties page, click Finish.

Test the demo MDT runbook

After the runbook is created, you are ready to test it.

  1. On the ribbon bar, click Runbook Tester.

  2. Click Run, and in the Initialize Data Parameters dialog box, use the following setting and then click OK:

    1. OSDComputerName: PC0010
  3. Verify that all activities are green (for additional information, see each target).

  4. Close the Runbook Tester.

  5. On the ribbon bar, click Check In.

Figure 30. All tests completed.

Use the MDT demo runbook from MDT 2013

  1. On MDT01, using the Deployment Workbench, in the MDT Production deployment share, select the Task Sequences node, and create a folder named Orchestrator.

  2. Right-click the Orchestrator node, and select New Task Sequence. Use the following settings for the New Task Sequence Wizard:

    1. Task sequence ID: OR001

    2. Task sequence name: Orchestrator Sample

    3. Task sequence comments: <blank>

    4. Template: Custom Task Sequence

  3. In the Orchestrator node, double-click the Orchestrator Sample task sequence, and then select the Task Sequence tab.

  4. Remove the default Application Install action.

  5. Add a Gather action and select the Gather only local data (do not process rules) option.

  6. After the Gather action, add a Set Task Sequence Variable action with the following settings:

    1. Name: Set Task Sequence Variable

    2. Task Sequence Variable: OSDComputerName

    3. Value: %hostname%

  7. After the Set Task Sequence Variable action, add a new Execute Orchestrator Runbook action with the following settings:

    1. Orchestrator Server: OR01.contoso.com

    2. Use Browse to select 1.0 MDT / MDT Sample.

  8. Click OK.

Figure 31. The ready-made task sequence.

Run the orchestrator sample task sequence

Since this task sequence just starts a runbook, you can test this on the PC0001 client that you used for the MDT simulation environment.

Note

Make sure the account you are using has permissions to run runbooks on the Orchestrator server. For more information about runbook permissions, see Runbook Permissions.

  1. On PC0001, log on as CONTOSO\MDT_BA.

  2. Using an elevated command prompt (run as Administrator), type the following command:

    cscript \\MDT01\MDTProduction$\Scripts\Litetouch.vbs
    
  3. Complete the Windows Deployment Wizard using the following information:

    1. Task Sequence: Orchestrator Sample

    2. Credentials:

      1. User Name: MDT_BA

      2. Password: P@ssw0rd

      3. Domain: CONTOSO

  4. Wait until the task sequence is completed and then verify that the DeployLog.txt file in the E:\Logfile folder on OR01 was updated.

Figure 32. The ready-made task sequence.