Today i will explain you how you can achieve patching by orchestrator including complex patching procedures.
Below is list of software that you will need:
- Excel – To put the steps that needs to be carried out in a sequential order
- MS SQL DBs
- PS Scripts
- MS Orchestrator
- MS SCCM
- MS SCSM (incase you want to make patching a self service offering)
Now a few things to keep things in order:
- In a Excel sheet arrange all steps that needs to be automated, below is just an example of column headers:
SequenceNo ActionType ComputerName Parameter1 Parameter2 Parameter3 Parameter4 Parameter5 Parameter6 Outcome Expected Patching by Orchestrator Excel sheet Template Patching by Orchestrator Template
- Now create DBs called ‘SteptoExecute’ in a SQL instance where you will upload the steps created in the previous steps, my suggestion is to create it in Orchestrator instance itself
- Another DBs called ‘ExecutedSteps’
- Now you have to create 1 main runbook which in turn will call multiple other runbooks that you need to create in next step.
- Here runbooks should be arranged to first read steps from ‘SteptoExecute’ and then invoke runbooks based on sequence#
- Other multiple runbooks that you need to create will mainly depend upon complexity of steps, here i will just give a high level of runbooks that will typical be required
- SCCM Patch push code runbook
- SCCM patching status code check runbook
- Service Start runbook – Runbook will take service name
- Service Stop runbook
- Service restart runbook
- Computer restart
- Computer restart with timeout
- Computer restart with check when it’s back online
- Run Program- Can use to run a batch file
- Web Status code checker – can be used to check response status code of web application – Click to download runbook web application response status code checker
- Email activity runbook – to send status of steps executed over an email
- Now use orchestrator runbook to invoke steps from the DBs in the sequential order arranged, use SQL DB read activity or a PS script
- Each step has an associated action type with it as explained earlier, which in turn will call the runbooks and runbooks will execute the steps such as stop/start/restart services, run batch files, rename files, start a web service, stop a web site and etc
- Make sure to make runbooks names same as action type, it will easier to invoke runbooks in the previous step
- Once all the steps are executed a email activity combines all the steps executed along with the results that are saved in ‘ExecutedSteps’ Db
In the next part i will share with you scripts that you will need and reference to other MVP and system center blogs which will be helpful to you.
However, due to NDA with my ex employer i will not be able to share complete runbooks or scripts that i have used.
Please note, do test your runbooks in a dev environment first. Sometimes it can take a few trial and error in getting the steps in a sequence order.