SCOrch – start runbooks from command line

 

To start runbooks from the command line there is a nice little tool which should not be missing in any Orchestrator environment:

SCOJobrunner – it can be donwloaded here , on this technet blogpost you´ll find a description

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:

 

Select lower(POLICIES.UniqueID) as RunbookID, lower(CUSTOM_START_PARAMETERS.UniqueID) as ParameterID, CUSTOM_START_PARAMETERS.value
From POLICIES
INNER JOIN OBJECTS  on POLICIES.UniqueID = OBJECTS.ParentID
LEFT OUTER JOIN CUSTOM_START_PARAMETERS on OBJECTS.UniqueID = CUSTOM_START_PARAMETERS.ParentID
Where POLICIES.Name = ‘My Runbook Name’ and policies.deleted = 0

 

You´ll find additional information here

 

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.

 

Thanks to Markus Klein, John Mattivi and Robert Hearn

Posted in: Uncategorized

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s