Building a better Orchestrator Runbook testing tool


The Story

I recently started working on a project that required me to create a lot of System Center Orchestrator Runbooks. I quickly became frustrated with the Runbook Tester application because it would only run while a runbook is checked out, rendering the runbook useless for colleagues that needed it. Also the application would run under your current account instead of the orchestrator service account so I couldn’t trust it’s results (I know I can log in under that account but the point is: I really shouldn’t have to). I then switched to the Orchestrator Console to test the runbooks. This takes care of all of the issues above but was still frustrating to test with for the following reason: everytime I start a runbook I have to manualy enter all the parameters. The more input parameters your runbook has, the longer it takes to test it. And then if I test the runbook and it fails within ten seconds I have to start all over again! Say it with me, folks: frustrating!

After a few days of self-pity and blaming Microsoft for my sorrows I thought to myself: If you can’t get the proper tools for the product, build one yourself! So I went to my favorite Powershell tool: Sapien Powershell Studio. I used some Microsoft MSDN pages to create my own set of functions to utilize the orchestrator web service, only to find out after the fact that someone else had build a cool module for it (check out this codeplex site). Then I build a GUI around it. I think its my best work yet!

The Plan

Here’s what I wanted my tool to do:

  • Get a list of runbooks to choose from.
  • Remember the last runbook that was run from the tool.
  • Get a list of parameters for the chosen runbook.
  • Enter all the parameter values that were last used.
  • Get a list of runbook servers to start the runbook on.
  • Save a runbooks values in a XML file for later use.
  • Start the runbook and (optionally) open the appropriate details page to monitor progress.
  • Delete saved parameters if the parameter was removed from the runbook.

The end result

And here it is for your viewing pleasure:

Main Form

The first time the tool launches it will ask you to configure your web service setings. This form looks like this:


You can either use your current credentials or provide alternate  ones. Once the test passes you’ll be able to click OK and go to the main form. Once you pick a runbook from the dropdown list the input parameters are loaded into the datagridview box. You can enter the values and use TAB to navigate through them. Once you’ve selected a runbook server you’ll be able to click the Run button and off you go!

All settings and values will be saved in the current user registry (HKCU:\Software\MicaH\Orchestrator Tool). The password will be encrypted. You can use the menu bar to open or save values to a XML file and edit your webservice configuration. Standard shortcuts are also available (Ctrl + S, Ctrl + O, etc.). The Refresh All button refreshes all the available runbooks (in case you create a new one) while the Refresh Current button only refreshes the runbook you’ve selected. This comes in handy if you add an input parameter to your runbook and don’t want to close and reopen the application.

 Care Package

The tool can be downloaded here:

Orchestrator Runbook Test Tool v 1.0

The tool has only been tested on a MS Windows 2012 R2 server but should work on other Microsoft operating systems (as long as DotNet and powershell are present). If you download it and find it to be useful, please leave a comment. Also, please report back if you find a bug or if you have idea’s on how to improve the tool.



Version History: - Fixed the forms resizing capabilities. - Fixed a bug where the outgoing parameters were also displayed. - Initial version

About MicaH

I'm a Senior Technical Specialist at PepperByte BV (the Netherlands).
This entry was posted in Powershell, Sapien Powershell Studio and tagged , , , , , , , . Bookmark the permalink.

1 Response to Building a better Orchestrator Runbook testing tool

  1. Steffan says:

    Hello MicaH, I think your tool is really cool and well made!!

    i myself am wokring on a Powershell GUI solution for the company i work for. Right now i am starting runbook with help of sharepoint and its working great. but i would like to know how you managed to do so with PS exe file.

    i guess i am asking for its source code to be honest. so thats that.


Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s