TASKLIST: Show service names

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,188
72
Albuquerque, NM
prospero.unm.edu
Have TASKLIST display names of any services associated with each PID:
Code:
C:\>tasklist s*
      4  System
    364  smss
    628  services
    772  svchost           DCOM Server Process Launcher, Plug and Play, Power
    852  svchost           RPC Endpoint Mapper, Remote Procedure Call (RPC)
    924  svchost           Windows Audio, DHCP Client, Windows Event Log, TCP/IP NetBIOS Helper, Security Center
   1012  svchost           Windows Audio Endpoint Builder, Offline Files, Network Connections, Program Compatibility Assistant...
   1036  svchost           COM+ Event System, Windows Font Cache Service, Network List Service, Network Store Interface Servic...
   1084  svchost           Application Information, Background Intelligent Transfer Service, IP Helper, Server, Multimedia Cla...
   1200  svchost           Group Policy Client
   1360  svchost           Cryptographic Services, DNS Client, Workstation, Network Location Awareness
   1488  spoolsv           Print Spooler
   1520  svchost           Base Filtering Engine, Diagnostic Policy Service, Windows Firewall
   1740  svchost           Diagnostics Tracking Service
   1784  sqlservr          SQL Server (SQLEXPRESS)
   1848  svchost           Net Driver HPZ12
   1904  svchost           Pml Driver HPZ12
    116  sqlwriter         SQL Server VSS Writer
   3944  SearchIndexer     Windows Search
   1176  svchost           SSDP Discovery
   2040  chrome            Suggestions | Take Command - Google Chrome

     21 processes.

C:\>
If a process has no associated services, display a window name, as before (like Chrome above). Services generally don't have windows.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,188
72
Albuquerque, NM
prospero.unm.edu
Also, it would probably be trivial to add PIDs to the list output by the SERVICES command. Say, SERVICES /Z to display PIDs in decimal, or /X for hex.
 
Last edited: