Pcornel
Browse topics
Options
Recent
Favorites
Command · Windows / Windows Server / PowerShell

sc.exe

sc.exe

Windows command-line service control/configuration utility that maps to Service Control Manager functions. It can query, start, stop and modify services; exact subcommand determines whether the operation is read-only or state-changing.

Execution context

Command Prompt or PowerShell. Supports local and remote service contexts subject to SCM access, RPC/connectivity and authorization.

Use when

Use `sc.exe query <service>` for low-level SCM state evidence and `sc.exe qc <service>`/related query commands for configuration. Use start/stop/config only after validating impact and exact syntax.

Then verify

Read the owning component’s state and event evidence, validate the effective resource/property, then repeat the exact operation that originally failed. Repeat the original workload/request before closure.

Privilege Not recordedState impact Changes stateProduction Unknown

Operational impact: Mixed. Query operations are low impact; start/stop/config/create/delete and related subcommands change service/system state and can be high impact.
Command detailsSafety model · family · platform · verification · bundle
PrivilegeNot recorded
Execution contextCommand Prompt or PowerShell. Supports local and remote service contexts subject to SCM access, RPC/connectivity and authorization.
State impactChanges state
Safe during productionUnknown
CategoryWindows Services
Evidence levelmixed
Primary DomainWindows
Technically verifiedNeeds verification date
Family Indows Ervices
PlatformWindows / Windows Server / PowerShell
PrerequisiteCommand Prompt or PowerShell. Supports local and remote service contexts subject to SCM a…
Output fields

Field glossary

Important fields projected from persisted Command guidance.

Service name, state, type, exit codes/checkpoint/wait hint for queries

Important persisted output field; use surrounding guidance for interpretation.

configuration fields such as start type, binary path, account and dependencies for config operations.

Important persisted output field; use surrounding guidance for interpretation.

Command → Topic semantics

Used in these Topics

Each relation carries both placement role and operational semantic: verifies, configures, troubleshoots, collects evidence, changes state or general.

DomainsWindows

Find another Command

Reference enrichment

Evidence boundary

What this output can establish — and where you must not over-claim.

Proves

Supports the state directly exposed by sc.exe for the selected object and execution context.

Does not prove

Does not by itself prove root cause, adjacent dependency health, effective end-to-end behavior, return-path health or workload recovery.

Next check

Read the owning component’s state and event evidence, validate the effective resource/property, then repeat the exact operation that originally failed. Repeat the original workload/request before closure.

Depth when you need it

Command guidance

Execution context

Command Prompt or PowerShell. Supports local and remote service contexts subject to SCM access, RPC/connectivity and authorization.

Use when

Use sc.exe query <service> for low-level SCM state evidence and sc.exe qc <service>/related query commands for configuration. Use start/stop/config only after validating impact and exact syntax.

Important fields

Service name, state, type, exit codes/checkpoint/wait hint for queries; configuration fields such as start type, binary path, account and dependencies for config operations.

Common problems

Using display name instead of service name; forgetting the unusual required spacing in some sc.exe config options; editing service configuration before proving the issue; treating STATE RUNNING as function health.

Operational impact

Mixed. Query operations are low impact; start/stop/config/create/delete and related subcommands change service/system state and can be high impact.

Runtime cautions

Capture query/config before state changes. After a control/config operation, re-query and perform a role-specific functional check.

Technical context

The generic sc.exe leaf represents multiple subcommands, so always reason about the specific operation and safety level.

Command Output Deep Dive

Variants · known-good and broken output

Read the stored sample against its authored expected state and interpretation, then return to the Command evidence boundary for what the observation can and cannot prove.

Known-good · 1Broken · 1Transitional · 1Observed · 1
1 · Observe the exact persisted fields/state.2 · Compare with authored known-good, broken or transitional samples.3 · Apply the Command evidence boundary; output is not end-to-end proof.4 · Run the next discriminating check and repeat the original workload/test when relevant.
Query one serviceObserved · Windows
SERVICE_NAME: Spooler
        TYPE               : 110  WIN32_OWN_PROCESS  (interactive)
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
Expected state

SCM reports service running

Interpretation

SCM reports the service lifecycle state as RUNNING. Print functionality and dependencies still require separate verification.

Evidence boundary

Supports the state directly exposed by sc.exe for the selected object and execution context.

Does not prove: Does not by itself prove root cause, adjacent dependency health, effective end-to-end behavior, return-path health or workload recovery.
Next check

Read the owning component’s state and event evidence, validate the effective resource/property, then repeat the exact operation that originally failed. Repeat the original workload/request before closure.

Known-good state patternKnown-good · Windows / Windows Server / PowerShell
State pattern: expected object is present, identity/scope matches the controlled test, terminal state is healthy and relevant counters/results are internally consistent.
Expected state

healthy/terminal

Interpretation

sc.exe — Known-good. State pattern: expected object is present, identity/scope matches the controlled test, terminal state is healthy and relevant counters/results are internally consistent. Why: this command exposes Windows component/runtime state state. What it proves: only the selected object/context and fields directly returned here. What it does not prove: root cause, adjacent dependency health or end-to-end workload success. Next check: Read the owning component’s state and event evidence, validate the effective resource/property, then repeat the exact operation that originally failed. Then repeat the original workload/request and verify the return path.

Evidence boundary

Supports the state directly exposed by sc.exe for the selected object and execution context.

Does not prove: Does not by itself prove root cause, adjacent dependency health, effective end-to-end behavior, return-path health or workload recovery.
Next check

Read the owning component’s state and event evidence, validate the effective resource/property, then repeat the exact operation that originally failed. Repeat the original workload/request before closure.

Transitional state patternTransitional · Windows / Windows Server / PowerShell
State pattern: object exists but negotiation, convergence, reconciliation, retry or recovery is still progressing; timers/counters or stage markers should change between samples.
Expected state

in-progress

Interpretation

sc.exe — Transitional. State pattern: object exists but negotiation, convergence, reconciliation, retry or recovery is still progressing; timers/counters or stage markers should change between samples. Why: this command exposes Windows component/runtime state state. What it proves: only the selected object/context and fields directly returned here. What it does not prove: root cause, adjacent dependency health or end-to-end workload success. Next check: Read the owning component’s state and event evidence, validate the effective resource/property, then repeat the exact operation that originally failed. Then repeat the original workload/request and verify the return path.

Evidence boundary

Supports the state directly exposed by sc.exe for the selected object and execution context.

Does not prove: Does not by itself prove root cause, adjacent dependency health, effective end-to-end behavior, return-path health or workload recovery.
Next check

Read the owning component’s state and event evidence, validate the effective resource/property, then repeat the exact operation that originally failed. Repeat the original workload/request before closure.

Broken state patternBroken · Windows / Windows Server / PowerShell
State pattern: expected object is absent, denied, unresolved, failed or divergent from the controlled test; error/result fields identify the directly observed boundary, not automatic root cause.
Expected state

failed/degraded

Interpretation

sc.exe — Broken. State pattern: expected object is absent, denied, unresolved, failed or divergent from the controlled test; error/result fields identify the directly observed boundary, not automatic root cause. Why: this command exposes Windows component/runtime state state. What it proves: only the selected object/context and fields directly returned here. What it does not prove: root cause, adjacent dependency health or end-to-end workload success. Next check: Read the owning component’s state and event evidence, validate the effective resource/property, then repeat the exact operation that originally failed. Then repeat the original workload/request and verify the return path.

Evidence boundary

Supports the state directly exposed by sc.exe for the selected object and execution context.

Does not prove: Does not by itself prove root cause, adjacent dependency health, effective end-to-end behavior, return-path health or workload recovery.
Next check

Read the owning component’s state and event evidence, validate the effective resource/property, then repeat the exact operation that originally failed. Repeat the original workload/request before closure.

Confirmation

Confirm action

Continue?