How to Export List of Running and Stopped Services in Windows
A service is an application type that runs in the system background without a user interface and is similar to a UNIX daemon process. Services provide core operating system features, such as Web serving, event logging, file serving, printing, cryptography, and error reporting.
This tutorial will show you how to export a list of running and stopped services to a file in Windows 7, Windows 8, and Windows 10.
Contents
- Option One: Export List of Running and Stopped Services in Command Prompt
- Option Two: Export List of Running and Stopped Services in PowerShell
For more Sc query command usage options, see: Sc query | Microsoft Docs
1 Open a command prompt.
2 Copy and paste the command you want to use below into the command prompt, and press Enter.
(List all running and stopped services in command prompt)
PowerShell Get-Service ^| Select StartType, Status, Name, DisplayName^| Format-Table -AutoSize
(List all running and stopped services to .txt file)
PowerShell Get-Service ^| Select StartType, Status, Name, DisplayName ^| Format-Table -AutoSize ^| Out-File -filepath "$Env:userprofile\Desktop\All_Services.txt"
(List all running and stopped services to .csv file)
PowerShell Get-Service ^| Select StartType, Status, Name, DisplayName ^| Export-Csv -path "$Env:userprofile\Desktop\All_Services.csv"
OR
(List all running services in command prompt)
PowerShell Get-Service ^| Select StartType, Status, Name, DisplayName ^| Where-Object {$_.Status -eq 'Running'} ^| Format-Table -AutoSize
(List all running services to .txt file)
PowerShell Get-Service ^| Select StartType, Status, Name, DisplayName ^| Where-Object {$_.Status -eq 'Running'} ^| Format-Table -AutoSize ^| Out-File -filepath "$Env:userprofile\Desktop\Running_Services.txt"
(List all running services to .csv file)
PowerShell Get-Service ^| Select StartType, Status, Name, DisplayName ^| Where-Object {$_.Status -eq 'Running'} ^| Export-Csv -path "$Env:userprofile\Desktop\Running_Services.csv"
OR
(List all stopped services in command prompt)
PowerShell Get-Service ^| Select StartType, Status, Name, DisplayName ^| Where-Object {$_.Status -eq 'Stopped'} ^| Format-Table -AutoSize
(List all stopped services to .txt file)
PowerShell Get-Service ^| Select StartType, Status, Name, DisplayName ^| Where-Object {$_.Status -eq 'Stopped'} ^| Format-Table -AutoSize ^| Out-File -filepath "$Env:userprofile\Desktop\Stopped_Services.txt"
(List all stopped services to .csv file)
PowerShell Get-Service ^| Select StartType, Status, Name, DisplayName ^| Where-Object {$_.Status -eq 'Stopped'} ^| Export-Csv -path "$Env:userprofile\Desktop\Stopped_Services.csv"
3 You will now have a text file on your desktop with the list of all currently running and/or stopped services.
For more Get-Service command usage options, see: Get-Service | Microsoft Docs
1 Open Windows PowerShell.
2 Copy and paste the command you want to use below into PowerShell, and press Enter.
(List all running and stopped services in PowerShell)
Get-Service | Select StartType, Status, Name, DisplayName | Format-Table -AutoSize
(List all running and stopped services to .txt file)
Get-Service | Select StartType, Status, Name, DisplayName | Format-Table -AutoSize | Out-File -filepath "$Env:userprofile\Desktop\All_Services.txt"
(List all running and stopped services to .csv file)
Get-Service | Select StartType, Status, Name, DisplayName | Export-Csv -path "$Env:userprofile\Desktop\All_Services.csv"
OR
(List all running services in PowerShell)
Get-Service | Select StartType, Status, Name, DisplayName | Where-Object {$_.Status -eq 'Running'} | Format-Table -AutoSize
(List all running services to .txt file)
Get-Service | Select StartType, Status, Name, DisplayName | Where-Object {$_.Status -eq 'Running'} | Format-Table -AutoSize | Out-File -filepath "$Env:userprofile\Desktop\Running_Services.txt"
(List all running services to .csv file)
Get-Service | Select StartType, Status, Name, DisplayName | Where-Object {$_.Status -eq 'Running'} | Export-Csv -path "$Env:userprofile\Desktop\Running_Services.csv"
OR
(List all stopped services in PowerShell)
Get-Service | Select StartType, Status, Name, DisplayName | Where-Object {$_.Status -eq 'Stopped'} | Format-Table -AutoSize
(List all stopped services to .txt file)
Get-Service | Select StartType, Status, Name, DisplayName | Where-Object {$_.Status -eq 'Stopped'} | Format-Table -AutoSize | Out-File -filepath "$Env:userprofile\Desktop\Stopped_Services.txt"
(List all stopped services to .csv file)
Get-Service | Select StartType, Status, Name, DisplayName | Where-Object {$_.Status -eq 'Stopped'} | Export-Csv -path "$Env:userprofile\Desktop\Stopped_Services.csv"
3 You will now have a .txt or .csv file on your desktop with the list of all currently running and/or stopped services.
That's it,
Shawn
Related Tutorials
- How to Start, Stop, Restart, Enable, and Disable Services in Windows 10
- How to Delete a Service in Windows 7, Windows 8, and Windows 10
- How to Restore Default Services in Windows 10
- How to Add Services to Control Panel in Windows 7, 8, and 10