{"id":81,"date":"2013-05-02T06:38:05","date_gmt":"2013-05-02T06:38:05","guid":{"rendered":"https:\/\/teacheritblog.wordpress.com\/?p=81"},"modified":"2013-05-02T06:38:05","modified_gmt":"2013-05-02T06:38:05","slug":"scorch-start-runbooks-from-command-line","status":"publish","type":"post","link":"https:\/\/christianlehrer.com\/?p=81","title":{"rendered":"SCOrch \u2013 start runbooks from command line"},"content":{"rendered":"<div class=\"shariff\" data-title=\"SCOrch \u2013 start runbooks from command line\" data-info-url=\"http:\/\/ct.de\/-2467514\" data-backend-url=\"https:\/\/christianlehrer.com\/wp-content\/plugins\/shariff-sharing\/backend\/index.php\" data-temp=\"\/tmp\" data-ttl=\"60\" data-service=\"tlxr\" data-services='[\"facebook\",\"twitter\",\"linkedin\",\"xing\",\"reddit\",\"whatsapp\",\"mail\",\"info\"]' data-image=\"\" data-url=\"https:\/\/christianlehrer.com\/?p=81\" data-lang=\"en\" data-theme=\"white\" data-orientation=\"horizontal\"><\/div><p>&#160;<\/p>\n<p>To start runbooks from the command line there is a nice little tool which should not be missing in any Orchestrator environment:<\/p>\n<p><strong>SCOJobrunner<\/strong> \u2013 it can be donwloaded <a href=\"http:\/\/orchestrator.codeplex.com\/releases\/view\/87873\" target=\"_blank\">here<\/a> , on this <a href=\"http:\/\/blogs.technet.com\/b\/orchestrator\/archive\/2012\/05\/15\/cool-tool-new-command-line-utility-to-start-a-runbook.aspx\" target=\"_blank\">technet<\/a> blogpost you\u00b4ll find a description<\/p>\n<p>What you need to start the runbook from cmd is the runbook id. An easy way to get the id by only providing the name is to use this short SQL-Query on your Orchestrator database:<\/p>\n<p>&#160;<\/p>\n<p>Select lower(POLICIES.UniqueID) as RunbookID, lower(CUSTOM_START_PARAMETERS.UniqueID) as ParameterID, CUSTOM_START_PARAMETERS.value   <br \/>From POLICIES    <br \/>INNER JOIN OBJECTS&#160; on POLICIES.UniqueID = OBJECTS.ParentID    <br \/>LEFT OUTER JOIN CUSTOM_START_PARAMETERS on OBJECTS.UniqueID = CUSTOM_START_PARAMETERS.ParentID    <br \/>Where POLICIES.Name = <font color=\"#ff0000\">&#8216;My Runbook Name&#8217;<\/font> and policies.deleted = 0<\/p>\n<p>&#160;<\/p>\n<p>You\u00b4ll find additional information <a href=\"http:\/\/jmattivi.blogspot.de\/2012\/07\/find-runbookparameter-guids-for-web.html\" target=\"_blank\">here<\/a><\/p>\n<p>&#160;<\/p>\n<p>So now you could save a running slot for a runbook that is only needed once a week or so by adding a scheduled task that is starting a runbook through SCOJobrunner.<\/p>\n<p>&#160;<\/p>\n<p>Thanks to <a href=\"http:\/\/www.ms-service-manager.com\/index.php\/myblog\" target=\"_blank\">Markus Klein<\/a>, <a href=\"http:\/\/jmattivi.blogspot.de\/\" target=\"_blank\">John Mattivi<\/a> and <a href=\"http:\/\/social.technet.microsoft.com\/profile\/robert_hearn\/\" target=\"_blank\">Robert Hearn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#160; To start runbooks from the command line there is a nice little tool which should not be missing in any Orchestrator environment: SCOJobrunner \u2013 it can be donwloaded here , on this technet blogpost you\u00b4ll find a description What you need to start the runbook from cmd is the runbook id. An easy way&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/christianlehrer.com\/index.php?rest_route=\/wp\/v2\/posts\/81"}],"collection":[{"href":"https:\/\/christianlehrer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/christianlehrer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/christianlehrer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/christianlehrer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=81"}],"version-history":[{"count":0,"href":"https:\/\/christianlehrer.com\/index.php?rest_route=\/wp\/v2\/posts\/81\/revisions"}],"wp:attachment":[{"href":"https:\/\/christianlehrer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/christianlehrer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/christianlehrer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}