Pcornel
Windows · Windows Services

Service Control Manager

Cheat sheet · https://pcornel.dk/topic.php?topic=3015

Back to the Topic

Answer

The Service Control Manager is the Windows component that maintains the database of installed services and driver services and provides the control interface used to enumerate, start, stop, query and configure them. It begins early in system startup and exposes service-management operations through Windows service APIs.

Remember

  • SCM stores/manages service configuration; applications should use service APIs/tools rather than editing the service database directly.
  • SCM state is reported by the service/driver lifecycle, not an application-level health probe.
  • Service controls are access-checked operations.
  • The SCM can manage local and, through supported APIs/tools, remote service contexts.
  • Pending states and timeouts are important evidence during start/stop troubleshooting.

First checks

  • Get-Service <name> | fl * — status, start type, dependencies
  • Get-CimInstance Win32_Service -Filter "Name='<name>'" | Select StartName,PathName,StartMode — account, path and mode
  • sc.exe qc <name> — configuration in CMD
  • Get-WinEvent -FilterHashtable @{LogName='System';ProviderName='Service Control Manager'} -MaxEvents 20 — SCM events

Verify in this order

SCM (services.exe) loads service config → starts/stops services → logs events

Where it usually breaks

First mismatch in definition/configuration → security context → service/task/process creation → runtime state → output/side effect → event/performance evidence; preserve identity/native error/pre-state before mutation.

Windows Services → Service Control Manager reference map

ItemMeaningEvidence boundary
Installed databaseService configuration recordsquery/configure through SCM APIs/tools
Control requestStart/stop/pause/etc.request can be accepted before workload is healthy
StatusPending/running/stopped/etc.reported lifecycle state
Access checkSCM/service rightsmanagement permission boundary
Event/logFailure contextcaptures startup/control errors and timeouts

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3015

Confirmation

Confirm action

Continue?