Often after monthly security and critical updates, a system requires a restart. System Configuration tools like SCCM provides a way to suppress the restart so that servers can be restarted in planned manner.

It would be completely fine to restart few handful of servers however, as the number increases it may become quite laborious to restart the servers manually.

My team was in similar situation where we have to restart some 40 – 50 odd servers.

Given this challenge of restart, I have written a powershell script that schedule & restart the servers.

A small 101 on the Automatic Server Restart script.

First run the following powershell commands. This will create a registry key to track server restart schedule. This needs to be done only once per system.