Learn how to list services that are running or stopped in Windows 11

|

|

This article provides a guide on listing and exporting services in Windows 11. It explains the significance of managing services and provides commands for listing running and stopped services as well as exporting them to TXT or CSV files using PowerShell or Command Prompt in Windows Terminal.

This article explains how to list and export services that are running or stopped in Windows 11.

In Windows, a service is a program that runs in the background and provides functionality to other programs and the operating system. Services are usually started when the computer boots up and runs continuously until the computer is shut down.

You can enable or disable services so that they do not automatically start up when the computer boots.

With the command line or PowerShell console, you can list services, even those that are stopped, and export them into a text file.

Learning how to list and export services in Windows can be useful for several reasons. For instance, it can help you troubleshoot issues related to a service not running correctly or determine which services consume too many system resources.

Additionally, if you are an IT professional or system administrator, knowing how to list and export services can assist you in managing and monitoring services on multiple computers in a network. By exporting the list of services to a text file, you can also keep a record of the current state of services on your system, which can be helpful for documentation and reporting purposes.

List all Running and Stopped services

As mentioned above, learning how to list and export services in Windows can help you troubleshoot issues.

Here’s how to do that.

First, open Windows Terminal and select the PowerShell tab.

List all services (Running and Stopped)

Type the command below to list all running and stopped services on the command console.

Get-Service | Select StartType, Status, Name, DisplayName | Format-Table -AutoSize

List only Running services

To list only services that are running, run the command below.

Get-Service | Select StartType, Status, Name, DisplayName | Where-Object {$_.Status -eq 'Running'} | Format-Table -AutoSize

List only Stopped services

To list only services that are stopped, run the command below.

Get-Service | Select StartType, Status, Name, DisplayName | Where-Object {$_.Status -eq 'Stopped'} | Format-Table -AutoSize

Use the steps below to export the services to a TXT or CSV file.

Export to TXT file

To export the list to a TXT file, append the line below.

| Out-File -filepath "$Env:userprofile\Downloads\Services.txt"

Example:

Get-Service | Select StartType, Status, Name, DisplayName | Format-Table -AutoSize | Out-File -filepath "$Env:userprofile\Downloads\Services.txt"

Export to a CSV file

Append the line below:

| Export-Csv -path "$Env:userprofile\Desktop\Services.csv"

Example:

Get-Service | Select StartType, Status, Name, DisplayName | Export-Csv -path "$Env:userprofile\Downloads\Services.csv"

List and export services with Command Prompt

If you prefer the Command Prompt with Windows Terminal, use the command below.

First, open Windows Terminal, then select the Command Prompt tab.

On the Command Prompt console, type the command below.

List all services (Running and Stopped)

PowerShell Get-Service ^| Select StartType, Status, Name, DisplayName ^| Format-Table -AutoSize

List only Running services

PowerShell Get-Service ^| Select StartType, Status, Name, DisplayName ^| Where-Object {$_.Status -eq 'Running'} ^| Format-Table -AutoSize

List only Stopped services

PowerShell Get-Service ^| Select StartType, Status, Name, DisplayName ^| Where-Object {$_.Status -eq 'Stopped'} ^| Format-Table -AutoSize

Export to a TXT file

If you want to export the list to a TXT file, append the command with a line below.

^| Out-File -filepath "$Env:userprofile\Desktop\Services.txt"

Example:

PowerShell Get-Service ^| Select StartType, Status, Name, DisplayName ^| Format-Table -AutoSize ^| Out-File -filepath "$Env:userprofile\Downloads\Services.txt"

Export to a CSV file

To export to a CSV file, append the line below.

^| Export-Csv -path "$Env:userprofile\Downloads\Services.csv"

Example:

PowerShell Get-Service ^| Select StartType, Status, Name, DisplayName ^| Where-Object {$_.Status -eq 'Running'} ^| Format-Table -AutoSize ^| Export-Csv -path "$Env:userprofile\Downloads\Services.csv"

That should do it!

Conclusion:

This post showed you how to list and export services on Windows 11. Please use the comments form below if you find errors or have something to add.

Like this:



Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.