The Core Technologies Blog

Professional Software for Windows Services / 24×7 Operation


How to Export the List of Windows Services on Your Computer

How to Export the List of Services on Your Computer

1. Export to CSV or tabbed text with the Services application

Perhaps the easiest way to export your services is with the built-in Windows Services application — services.msc.

To export, simply:

  1. Start Services. Click the Start button, type services.msc in the search field and hit return.

  2. From the Action menu, select Export List:

    Services: Export List
  3. Choose the format (tab delimited text or CSV), enter a file name and click Save to create the file.

Your file will contain the following five columns of data, which you cannot customize:

  1. Name (Note: This is the service’s display name, not its unique name used by Windows)

  2. Description

  3. Status

  4. Startup Type

  5. Log On As

If that’s all you need then you’re good to go!

2. Export to CSV or XML with PowerShell

Even though it’s easy to do, exporting with the Services application may not provide all the information you would like to capture. For example, the service name is not included and neither is the command line used to start the service.

If you’d like more columns, then PowerShell is another option.

For example, this command lists all the services on your machine:

Get-CIMInstance -Class Win32_Service | Select-Object Name, DisplayName, Description, StartMode, DelayedAutoStart, StartName, PathName, State, ProcessId

The output looks like this:

PowerShell: List all services

Note that you can add or remove properties from the Select-Object section as you see fit. Feel free to include any property listed in the Win32_Service class documentation.

And once you’ve settled on a command that prints the necessary information, call the Export-CSV module at the end to send the results to a file.

For example, this command exports the list of services to “C:\output-file.csv”:

Get-CIMInstance -Class Win32_Service | Select-Object Name, DisplayName, Description, StartMode, DelayedAutoStart, StartName, PathName, State, ProcessId | Export-CSV -Path C:\output-file.csv

If you prefer to create an XML file, call Export-Clixml instead:

Get-CIMInstance -Class Win32_Service | Select-Object Name, DisplayName, Description, StartMode, DelayedAutoStart, StartName, PathName, State, ProcessId | Export-Clixml -Path C:\output-file.xml

But we must warn you — the XML created is a bit difficult to read (or parse):

Services exported to XML with PowerShell

3. Export to XML with Windows Service Auditor

Finally, if you’re after XML, our free Windows Service Auditor utility is worth a look.

We created Windows Service Auditor to help protect against changes to your important Windows Services but it has the ability to export the list of services to an XML file as well.

After downloading and starting Windows Service Auditor, simply select Export (XML} from the All Services menu to create the XML file:

Windows Service Auditor: Export XML

The XML will be very detailed, with all aspects of your Windows Services recorded. Here is an example:

XML created by Windows Service Auditor

Because its output is so detailed, Windows Service Auditor is your best option if your goal is to take a snapshot of your services and all their settings.

Hopefully one of these three methods works for you!

Posted in Windows Services | Tagged , , , , | Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *