This runbook will check a computer to see if it is reachable, put it into maintenance mode, restart it, and update a sharepoint list on success. It can be ran manually (ad-hoc) or invoked from another runbook.
This runbook will cover the following activities:
- Using the built-in Get Computer / IP Status activity, based on a pre-filled Orchestrator Computer Group, to determine whether the server is reachable
- Using the built-in Send E-mail Message activity upon failure to reach a server
- Using the SCOM Integration Pack’s Start Maintenance Mode to begin maintenance mode
- Using the built-in Restart System activity to perform the reboot
- Using the Sharepoint Integration Pack’s Create List item to update a Sharepoint List on success, it will also show time saved by this runbook.
You do not have to use a Computer Group, you can specify one machine at the Get Computer / IP Status part
There are also many ways to get your list of computers, from reading a text file, getting the contents of an AD group, reading from a Sharepoint list, etc.
1. Get Computer/IP Status
We are running through our list of servers by referencing our pre-made Computer Group.
The rest of the settings can stay as default.
2. Link between steps 1 and 2 (failure)
If the result of Get Computer/IP Status is unsuccessful, then a notification e-mail will be sent in the next activity.
3. Send Email
The Subject field contains published info from the Get Computer/IP Status activity so that the computer name is featured.
The To field contains a variable that holds an my e-mail address.
4. Link between activity 1 and 3
If the result of Get Computer/IP Status is successful, then maintenance mode will be put on the computer.
5. Start Maintenance Mode
- Add in your connection to SCOM
- Add in the Computer name that will be entered into Maintenance Mode, which will be the computer that was tested, you can reference this Computer name via the published data from that first step. Right-click, Subscribe, Published Data
- Enter a Reason, using the selection button to the right of the field helps with choices
- Enter the required duration of the maintenance window
- Add comments
6. Link between Activity 3 and 4
If Start Maintenance Mode returns successful, then the reboot can occur in the next activity.
7. Restart System
- Use the same reference to the computer that was tested
- Enter a message
- Enter wait time before the reboot
- Choose whether the reboot will be forced
- Enter credentials that have the rights to perform the reboot under the security section
8. Link between Activity 4 and 5
If Restart System returns successful, then the list update can occur in the next activity.
9. Create List Item
- Enter the Sharepoint Configuration
- Fill in the required properties (What the list requires when adding a new item)
- List Name
- Time Saved (Minutes)