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"}

6 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”

  3. yes ,it possible do this:
    for %%s in (
    “BitLocker Drive Encryption Service”
    “Bluetooth Audio Gateway Service”
    “Bluetooth Support Service”
    “Connected Devices Platform Service”
    “Data Usage”
    “Diagnostic Policy Service”
    “Diagnostic Service Host”
    “Diagnostic System Host”
    “Diagnostic Execution Service”
    “Distributed Link Tracking Client”
    “Downloaded Maps Manager”
    “Encrypting File System (EFS)”
    “Fax”
    “File History Service”
    “Geolocation Service”
    “Language Experience Service”
    “Offline Files”
    “Phone Service”
    “Plug and Play”
    “Print Spooler”
    “Printer Extensions and Notifications”
    “Program Compatibility Assistant Service”
    “Parental Controls”
    “Payments and NFC/SE Manager”
    “Recommended Troubleshooting Service”
    “Remote Desktop Configuration”
    “Remote Desktop Services”
    “Remote Desktop Services UserMode Port Redirector”
    “Routing and Remote Access”
    “Retail Demo Service”
    “Smart Card”
    “Smart Card Device Enumeration Service”
    “Smart Card Removal Policy”
    “Secondary Logon”
    “Telephony”
    “Touch Keyboard and Handwriting Panel Service”
    “WalletService”
    “Windows Biometric Service”
    “Windows Error Reporting Service”
    “Windows Event Collector”
    “Windows Image Acquisition (WIA)”
    “Windows Insider Service”
    “Windows Push Notifications System Service”
    “Windows PushToInstall Service”
    “Windows Search”
    “Windows Update”
    “Windows Update Medic Service”
    “Xbox Accessory Management Service”
    “Xbox Live Auth Manager”
    “Xbox Live Game Save”
    “Xbox Accessory Management Service”
    “Xbox Live Networking Service”

    )do (for /F “tokens=1,* delims== ” %%a in (‘ sc GetKeyName %%s ^| find “=” ‘) do (set “serviceName=%%b” & sc config %%b start=Auto & net start %%b))

  4. bAtCh gUrUs!!!! lol

  5. I am being asked to not only get a list of all services but the version number. Everything I have found says nothing of a version number. The only way I have been able to do this is going through Task Manager and one by one, right clicking on detail to get it. All of this is foreign to me so anything helps. Thanks

  6. Use tasklist to create a csv
    TASKLIST /V /FO CSV > c:\test.csv
    open the csv in excel and filter (convert to txt first it will make importing to excel easier.)
    TASKLIST [/S system [/U username [/P [password]]]]
    [/M [module] | /SVC | /V] [/FI filter] [/FO format] [/NH]

    Description:
    This tool displays a list of currently running processes on
    either a local or remote machine.

    Parameter List:
    /S system Specifies the remote system to connect to.

    /U [domain\]user Specifies the user context under which
    the command should execute.

    /P [password] Specifies the password for the given
    user context. Prompts for input if omitted.

    /M [module] Lists all tasks currently using the given
    exe/dll name. If the module name is not
    specified all loaded modules are displayed.

    /SVC Displays services hosted in each process.

    /APPS Displays Store Apps and their associated processes.

    /V Displays verbose task information.

    /FI filter Displays a set of tasks that match a
    given criteria specified by the filter.

    /FO format Specifies the output format.
    Valid values: “TABLE”, “LIST”, “CSV”.

    /NH Specifies that the “Column Header” should
    not be displayed in the output.
    Valid only for “TABLE” and “CSV” formats.

    /? Displays this help message.

    Filters:
    Filter Name Valid Operators Valid Value(s)
    ———– ————— ————————–
    STATUS eq, ne RUNNING | SUSPENDED
    NOT RESPONDING | UNKNOWN
    IMAGENAME eq, ne Image name
    PID eq, ne, gt, lt, ge, le PID value
    SESSION eq, ne, gt, lt, ge, le Session number
    SESSIONNAME eq, ne Session name
    CPUTIME eq, ne, gt, lt, ge, le CPU time in the format
    of hh:mm:ss.
    hh – hours,
    mm – minutes, ss – seconds
    MEMUSAGE eq, ne, gt, lt, ge, le Memory usage in KB
    USERNAME eq, ne User name in [domain\]user
    format
    SERVICES eq, ne Service name
    WINDOWTITLE eq, ne Window title
    MODULES eq, ne DLL name

    NOTE: “WINDOWTITLE” and “STATUS” filters are not supported when querying
    a remote machine.

    Examples:
    TASKLIST
    TASKLIST /M
    TASKLIST /V /FO CSV
    TASKLIST /SVC /FO LIST
    TASKLIST /APPS /FI “STATUS eq RUNNING”
    TASKLIST /M wbem*
    TASKLIST /S system /FO LIST
    TASKLIST /S system /U domain\username /FO CSV /NH
    TASKLIST /S system /U username /P password /FO TABLE /NH
    TASKLIST /FI “USERNAME ne NT AUTHORITY\SYSTEM” /FI “STATUS eq running”

Leave a Reply