Automatic StartMode Service Stopped in Windows server : PowerShell Script to List the Servers and List of Service

I had free time this evening , and I thought of using this time for PowerShell Scripting . So I came up with an IDEA to build a Powershell script which will query the list of servers and get the status of services(windows server) whose StartMode is set as Automatic.

As All of us know (Windows Administrators) , If the startmode of a service is set to automatic , that service has to be in “RUNNING” State ( Even If it screw’s your System 🙂 )

Some times this will not be the case , On Most of the instances if the server is patched and rebooted , some of the Automatic Services will not start.

To determine the servers and list of services , One can use Below PowerShell Code