Windows: List Services – CMD & PowerShell

The services in Windows can be listed using the Service Manager tool.

To start the Service Manager GUI, press Win keybutton to open the start menu, type in services to search for the Service Manager and press Enter to launch it.

The services can also be listed using the command-line prompt (CMD) or the PowerShell.

In this note i am showing how to list the services and how to search for a specific service in Windows using the command-line prompt (CMD) or the PowerShell.

Cool Tip: List processes in Windows from the CMD! Read more →

List Services Using Command Line (CMD)

List all services:

C:\> sc queryex type=service state=all

List service names only:

C:\> sc queryex type=service state=all | find /i "SERVICE_NAME:"

Search for specific service:

C:\> sc queryex type=service state=all | find /i "SERVICE_NAME: myService"

Get the status of a specific service:

C:\> sc query myService

Get a list of the running services:

C:\> sc queryex type=service
- or -
C:\> sc queryex type=service state=active
-or -
C:\> net start

Get a list of the stopped services:

C:\> sc queryex type=service state=inactive

Cool Tip: Start/Stop a service in Windows from the CMD & PowerShell! Read more →

List Services Using PowerShell

List all services:

PS C:\> Get-Service

Search for specific service:

PS C:\> Get-Service | Where-Object {$_.Name -like "*myService*"}

Get the status of a specific service:

PS C:\> Get-Service myService

Get a list of the running services:

PS C:\> Get-Service | Where-Object {$_.Status -eq "Running"}

Get a list of the stopped services:

PS C:\> Get-Service | Where-Object {$_.Status -eq "Stopped"}

2 Replies to “Windows: List Services – CMD & PowerShell”

  1. In
    “sc queryex type=service state=all”
    needs to be space after the “type=” and the “state=” to be:
    “sc queryex type= service state= all”

  2. Hello everyone
    If i want to run all the services by one command in cmd is that possible ?
    Or i have to run one by one by run it like this

    sc config “service name” start=auto

    Or
    Net start “service name”

Leave a Reply

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