Advertisement

Save List of Services to File in Windows 10

Windows services are a special apps which run in the background. Most of them have no interaction with the user session and have no user interface. Services are one of most important parts of the Windows NT operating system family, which was started with Windows NT 3.1 and includes all modern Windows versions like Windows 7, Windows 8 and Windows 10. Today, we will see how to save the list of running and stopped services to a text file.

Advertisеment

Saving the list of services to a file is not a problem when you are using some third-party process manager. For example, the well-known process manager from Sysinternals, Process Explorer, allows exporting the list of running apps.

Out of the box, Windows 10 offers a few tools to manage services. The only GUI tool isa special MMC snap-in called "Services". Press Win + R shortcut keys on the keyboard to open the Run dialog. Type services.msc in the Run box.Run Services Msc

The Services console looks as follows.

Services In Windows 10

However, it doesn't allow saving the list of services to a file.

To bypass this limitation, we can use a special console tool, "sc". It is a powerful app which will allow you to manage existing services in Windows 10.

Save running services to a file

To save running services to a file in Windows 10, do the following.

  1. Open a new command prompt as Administrator.
  2. Type the following command to save the list of running services to a file:
    sc query type= service > "%userprofile%\Desktop\active_services.txt"

    Change the file name and its path according to your preferences.

  3. By following the example above, you will get a text file named "active_services.txt" in the Desktop folder. It will contain the list of your currently running services. Open it with a text editor app, e.g. Notepad.WIndows 10 Save Services To A File In Windows 10 With Sc

You are done.

Tip: Run sc.exe with the option /? (sc /?) to see the available options. Alternatively, see this online document.

Alternatively, you can use PowerShell. It comes with a special cmdlet  Get-Service.

Save Running Services to a File with PowerShell

  1. Open PowerShell. If required, run it as Administrator.
  2. Type the command Get-Service | Where-Object {$_.Status -eq "Running"} to see the list of the running services.WIndows 10 Save Services To A File In Windows 10 With Ps1
  3. To save it to a file, run the command:
    Get-Service | Where-Object {$_.Status -eq "Running"} | Out-File -filepath "$Env:userprofile\Desktop\active_services.txt"
  4. This will create a new text file "active_services.txt" in your Desktop folder.WIndows 10 Save Services To A File In Windows 10 With Ps2

Save Stopped Services to a File

  1. In an elevated command prompt, run the following command: sc query type= service state= inactive > "%userprofile%\Desktop\inactive_services.txt".WIndows 10 Save Inactive Services To A File In Windows 10 With Sc
  2. Alternatively, open an elevated PowerShell  and execute the following command sequence. Get-Service | Where-Object {$_.Status -eq "Stopped"} | Out-File -filepath "$Env:userprofile\Desktop\inactive_services.txt".WIndows 10 Save Inactive Services To A File In Windows 10 With Ps
  3. Regardless of the method you use, you will get a new file, inactive_services.txt, in your Desktop folder. Open it with Notepad.

Save The List of All Windows Services to a File

  1. In an elevated command prompt, run the following command: sc query type= service state= all > "%userprofile%\Desktop\all_services.txt".WIndows 10 Save All Services To A File In Windows 10 With Sc
  2. Alternatively, open an elevated PowerShell  and execute the following command sequence. Get-Service | Out-File -filepath "$Env:userprofile\Desktop\all_services.txt".WIndows 10 Save All Services To A File In Windows 10 With Ps
  3. Regardless of the method you use, you will get a new file, all_services.txt, in your Desktop folder. Open it with Notepad.

That's it.

Related articles:

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Advertisеment

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

Leave a Reply

Your email address will not be published.

css.php
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.