This article explains how to list and export services 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 the 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:
- Listing and exporting services in Windows 11 is essential for troubleshooting issues and managing services efficiently.
- The ability to list running and stopped services provides valuable insights into system resource usage and functionality.
- Exporting the service list to a TXT or CSV file enables documentation, reporting, and offline analysis of service states.
- Whether you prefer using Windows Terminal with PowerShell or Command Prompt, the provided commands and steps make the process straightforward and accessible.
Leave a Reply Cancel reply