Generate Windows Services Report

This script was designed to inventory the running services in your infrastructure. It requires a c:\temp\servers.txt file to be created and populated with server names; it will then query the wmi-object class ‘win32_services’ to get the necessary info and export it to a csvĀ file in c:\temp. Be cautious as you enter the server names into the servers.txt file as the script currently does not handle actually pinging the servers and will attempt to query servers even if they are offline which will result in a lot of errors.

You can also easily change the type of services you are querying for – if for instance you need all services, not just ones that are in a running state:

Here is the full script:

Here is a sample run:

Script executed by knguyen for 07-25-2018 11:15:13
Script found c:\temp\servers.txt
Script is executing query against list of servers in c:\temp\servers.txt…
Script execution completed; please check below files:

Name LastWriteTime Length
—- ————- ——
servername_servicesOutput.csv 7/25/2018 11:15:14 AM 40094

Leave a Reply

Be the First to Comment!

Notify of