Services are a major component of the Windows system. They allow for the creation and management of long-running processes. Windows services can be started automatically at system boot without user intervention.
On the other hand, processes run in the background on Windows systems. They either run automatically or are started by other installed applications.
Service
Service statuses can appear as
Running,Stopped, orPaused, and they can be set to start manually, automatically, or on a delay at system boot.
Processes
Processes associated with installed applications can often be terminated. Certain processes are critical and, if terminated, will stop certain components of the OS from running properly.
Service Control Manager
Windows services are managed via the Service Control Manager (SCM) system, accessible via the
services.mscMMC add-in.
# == SERVICES ==
# List running services - powershell
Get-Service | ? {$_.Status -eq "Running"}
# Filter 'update' from running services - powershell
Get-Service | ? {$_.Status -eq "Running"} | ? {$_.Name -like "*update*"}
# List running services - powershell alternative
Get-Service | Where Status -eq Running
# List running services - SC
sc query
# Query service over the network - SC
sc \\$IP qc ServiceName
# List running services - WMIC
wmic service where (state="running") get caption,name,state
# == PROCESSES ==
# List running processes - CMD
tasklist /svc | findstr lsass
# List running processes - powershell
Get-Process lsassMicrosoft Document
Critical System Services
In Windows, there are some critical system services that cannot be stopped and restarted without a system restart. If you update any file or resource in use by these services, to apply changes the system needs to restart.
Process Description smss.exeSession Manager Subsystem - Handles sessions on the system csrss.exeClient Server Runtime Process - User-mode portion of Windows subsystem wininit.exeProcesses .ini files for changes after program installation logonui.exeFacilitates user login to PC lsass.exeLocal Security Authentication Server - Verifies user logons services.exeManages starting and stopping services winlogon.exeHandles secure attention sequence, user profiles, and screen locking SystemBackground system process running the Windows kernel svchost.exe (RPCSS)Manages DLL-based services using Remote Procedure Call Service svchost.exe (Dcom/PnP)Manages DLL-based services using DCOM and Plug and Play