Update 10/12/2016: This feature is available generally in System Center 2016
Today in System Center Service Management automation (SMA) deployment, when a Runbook is triggered, user has no control on which Runbook Worker would this job run. To address this issue SMA 2016 introduces the concept of designating a Runbook to a Runbook Worker. With this feature, users will now have the control to either trigger a Runbook normally where the job would run on a random Runbook Worker or on a specific pre-configured Runbook Worker.
This blog discusses in detail on how to designate a Runbook to a Runbook Worker. Note that, designating Runbook to a Runbook Worker works does not differentiate between the types of Runbook.
For a quick demo of this feature, you can watch the following video. For a more in-depth look, continue reading the blog.
Configure the Runbook:
Use the Set-SmaRunbookConfiguration cmdlet to designate a Runbook to a Runbook Worker:
A new parameter ‘RunbookWorker’ has been added to Set-SmaRunbookConfiguration cmdlet which takes the name of a Runbook Worker as an input. SMA validates this entry from the existing Workers in the deployment. Note that, this command would run for all Runbooks in case Runbook Name is not provided.
Get the List of existing Runbook Workers:
To get a list of existing Runbook Workers in the current SMA deployment, use the Get-SmaRunbookWorkerDeployment cmdlet:
View the changes made to Runbook’s configuration:
You can view the changes made to the Runbook’s configuration using the Get-SmaRunbook cmdlet:
After this configuration is done for a Runbook, any new job triggered for that Runbook would run on the configured Runbook Worker.
Remove the Designated Runbook Worker from the Runbook’s Configuration:
The association between Runbook and Runbook Worker can be removed using the Set-SmaRunbookConfiguration cmdlet with value to RunbookWorker parameter as ‘$null’:
- What if a wrong or invalid Runbook Worker name is provided while configuring a Runbook?
While configuring the Designated Runbook Worker for a Runbook, if the Runbook Worker is not present in the current SMA Deployment, the cmdlet would fail and the following error message would be displayed:
“Set-SmaRunbookConfiguration : The Runbook Worker ‘’ cannot be found “
- What if the Runbook Worker is deleted/removed from the SMA deployment after designating it to a Runbook?
In case the configured Runbook Worker is deleted from the SMA deployment after it has been designated to a Runbook, no job would be created when the Runbook is triggered and the following error message would be logged in Event logs:
“Runbook execution failed. Designated Runbook Worker assigned to the Runbook is either down or has been removed “
Please feel free to use the comments section below for any queries or to share your feedback. We look forward to hearing from you.