/
/

How to Export a List of Running and Stopped Services in Windows 11

by Jarod Habana, IT Technical Writer
How to Export a List of Running and Stopped Services in Windows 11 blog banner image

Windows services are processes that perform specific system functions in the background to support other programs without requiring user interaction. They ensure core system features and third-party applications function smoothly. IT professionals and administrators need visibility into these services within technical environments to maintain system integrity, troubleshoot issues, and conduct audits.

If you want to learn how to export a list of running and stopped services, keep reading for Command Prompt and PowerShell methods.

Methods for exporting a running and stopped services list

When exporting this list, admins and power users can choose between the two methods: Command Prompt or PowerShell. Each has its advantages that may be more suited for specific users and environments.

📌 Prerequisites: Windows 11 and standard user permissions

💡Tip: Check out Things to look out for before proceeding.

📌 Recommended deployment strategies:

Click to Choose a Method

💻

Best for Individual Users

💻💻💻

Best for Enterprises

Method 1: Export the list using Command Prompt
Method 2: Export the list using PowerShell

Method 1: Export the list using Command Prompt

This quick and simple method extracts service status information into a .txt file using Command Prompt.

📌 Use Cases: Quick diagnostics and offline auditing in environments with restricted scripting capabilities

  1. Open Command Prompt. Press Windows key + R, type “cmd,” and press Enter.
  2. Copy and paste the appropriate command for the action you want to take before pressing Enter:
    • To list all services and export to a .txt file:
      sc query type= service state= all > “%userprofile%\Desktop\ServicesList.txt”
    • To only list running services in Windows and export to a .txt file:
      sc query type= service | findstr “SERVICE_NAME STATE RUNNING” > “%userprofile%\Desktop\RunningServices.txt”
    • To only list stopped services in Windows and export to a .txt file:
      sc query type= service state= inactive > “%userprofile%\Desktop\StoppedServices.txt”
  3. Review the .txt file created on your desktop.

Method 2: Export the list using PowerShell

This method is a powerful and flexible approach for exporting running and stopped services lists, as PowerShell allows for structured output, easy filtering, and automation.

📌 Use Cases: Monitoring service logs for multiple machines, and integration into scripts and scheduled tasks

  1. Open PowerShell. Press Windows key + R, type “powershell,” and press Enter.
  2. Copy and paste the appropriate command for the action you want to take before pressing Enter:
    • To list all services and export to a .csv file:
      Get-Service | Select-Object StartType, Status, Name, DisplayName | Export-Csv -Path “$Env:userprofile\Desktop\AllServices.csv” -NoTypeInformation
    • To only list running services in Windows and export to a .csv file:
      Get-Service | Where-Object {$_.Status -eq ‘Running’} | Select-Object StartType, Status, Name, DisplayName | Export-Csv -Path “$Env:userprofile\Desktop\RunningServices.csv” -NoTypeInformation
    • To only list stopped services in Windows and export to a .csv file:
      Get-Service | Where-Object {$_.Status -eq ‘Stopped’} | Select-Object StartType, Status, Name, DisplayName | Export-Csv -Path “$Env:userprofile\Desktop\StoppedServices.csv” -NoTypeInformation
  3. Review the .csv file created on your desktop.

⚠️ Things to look out for

Risks

Potential Consequences

Reversals

Misinterpreting stopped but critical services as unnecessary and disabling them
  • Application failures
  • The system fails to boot, crashes, or loses networking or security features.
  • Research the default startup type for the service.
  • Reboot into Safe Mode with Networking, open Services.msc, and re-enable the affected service.
Outdated export files
  • Incorrect assumptions about service states
  • Always create fresh exports before taking action.
  • Compare against known-good baselines or templates.
  • Label exports with timestamps to avoid confusion.
File mismanagement and data exposure
  • Exported files may be shared unintentionally, exposing sensitive system configuration details.
  • Malicious actors could use these lists to identify vulnerabilities.
  • Delete outdated or unnecessary export files.
  • Use encrypted storage or access-controlled directories.
  • Avoid uploading these files to shared cloud platforms without reviewing the contents.

Why export a list of running and stopped services?

Exporting this list can be beneficial in various ways. Here are some reasons you may consider:

  • System auditing: The list can help verify the status of services for compliance and security reviews.
  • Troubleshooting: When there are missing and malfunctioning services that are causing app and system issues, this list may help pinpoint the problem.
  • Documentation: In managed IT environments, the list serves as a snapshot of the service configuration for record-keeping purposes.
  • Tracking changes: Admins can use it to look for unauthorized changes by comparing historical reports with current service states.
  • Performance analysis: The list can reveal unnecessary services that admins can disable to reduce resource usage and improve system performance.
  • Disaster recovery planning: Admins can reference the list for restoring service configurations after system crashes or reinstallation.

Additional considerations when creating Windows service lists and exporting them

Administrators and power users must remember a few things when exporting Windows service lists.

Secure storage of exported files

Exported service lists may contain sensitive information from critical service names to statuses and configurations. If disclosed incorrectly, malicious actors might use these details. Consider storing these files in a secure directory, using file encryption, or restricting file access, especially in multi-user environments.

Regularly update and review

Software installations, Windows updates, and manual changes frequently change service statuses. To maintain an accurate snapshot of your system, it’s best to regularly update these service lists for easier comparisons, detection of unauthorized modifications, and system stability maintenance.

Automate for efficiency

If you must export service lists on multiple systems, you can employ the efficiency and consistency that PowerShell’s scripting capabilities can offer. Admins can deploy PowerShell scripts through Group Policy or the task scheduler. They can also use remote management tools to run exports across networks.

Quick-Start Guide

NinjaOne has a built-in script called “Check for Stopped Automatic Services” that can help you identify and potentially restart stopped services in Windows 11.

The script specifically:

  • Checks for automatic services that are not currently running
  • Ignores services set to “Delayed Start” or “Trigger Start”
  • Can be used to report on or start stopped services

Troubleshooting common issues

Incomplete service lists

This issue may be due to syntax errors or a problem with permissions. Isolate the issue by running the Command Prompt or PowerShell command to list all services and ensuring this base command works before running those with filters (for running or stopped services). This should help confirm if you can access service data. Otherwise, you may not have sufficient permissions to execute the command.

Access denied errors

Although these commands work with standard user permissions, “Access denied” errors may stem from insufficient permissions, especially on managed devices. Before executing the commands, consider running Command Prompt or PowerShell as an Administrator.

File not created or found

If you run an export command but no file appears on the desktop, you may have a typo in the file path. Check that the file path is correct and typed exactly as listed above. Additionally, make sure you have write permissions in the target directory.

Exporting Windows service lists responsibly

IT administrators and power users who want to maintain visibility and control over their systems can export detailed lists of running and stopped services to document their configurations. They can use Command Prompt or PowerShell to do so, allowing for more flexibility depending on their environment. However, it’s crucial to consider security, automation, and troubleshooting factors to ensure system stability and compliance while managing the system.

Related topics:

You might also like

Ready to simplify the hardest parts of IT?