

Let's build some code to check for these registry values' existence. The server is pending a reboot if the RebootPending and RebootRequired values exist.

We'll do this over PowerShell Remoting, so I'm assuming it is available on your servers. Knowing these registry values, we then create the PowerShell code to check for them on a remote server.

Also, if you manage a lot of servers, you may want to schedule a maintenance window to reboot them all at once rather than as needed. Servers are serving users, and users don't like it when their services go down at any time. The solution to a needed reboot is simple: reboot it! But it's not always that simple.

There are many different reasons a server may need a reboot, like software that needs to modify something currently running, a locked file that refuses to let go without a boot, or perhaps a service that can only apply a change at boot time. In Windowsland especially, a reboot now and then is required. Unfortunately, we can't always keep our servers up 24/7.
