In my MMS 2015 session “Real world Automation with Service Manager and Azure Automation” with Steve Buchanan I showed how you can patch Servers initialized from a Service Manager Change Request.
The idea behind that is that there are systems which cannot be patched (and rebooted) during normal patch windows because the application owners need to control the outage times by themselves. They only know when production can handle a server outage. With Service Manager they can follow the ITIL Standards and create a Change Request, select a SCCM Collection with its Servers and the Software Updates to be applied. The Change Request will then call an Orchestrator Runbook and implement the Patches on all Servers in the given Collection.
- The Software Updates need to be pre-deployed to all effected Servers through SCCM (Deployment Type: Available).
- System Center Orchestrator 2012 R2, System Center Service Manager 2012 R2, System Center Configuration Manager 2012 R2
- Log Database on SQL to store process Information
- Sync SCCM Collections with SCSM
Temp DB Setup:
Select Template: (Patch Server)
Select Config Items to Change – SCCM Collection (Collection Info):
Select Related Items – Configuration Items: Computers, Services and People (Software Update):
Runbook Automation Activity:
The following screenshots show the runbooks which are used for this solution.
The main runbook:
Install Software Updates (called from SCSM)
Get CR Details (writes all necessary CR information to the DB)
Get Software Updates (write Software Update Information to the DB)
Get Collection IDs (writes SCCM Collection Information to the DB)
Split Patching by Server (gets all Servers within the Collection)
Split by Patch (reads all updates from the DB)
Check Updates (checks if the Patch is available on the machine)
Install Update (installs the update on the machine)
Update CR (updates the Change Request)
- Use Service Request instead of CR
- Import SCCM Software Update Groups into SCSM and select them
This YouTube-Video shows you the process in action.
The complete solution can be downloaded here.