Standard user
sc.exe query <service>
sc.exe query <service>
Shows the state of a Windows service: running, stopped or pending, and its exit code.
A service will not start, or hangs in START_PENDING.
Check the configuration with sc.exe qc <service> and the System log (Service Control Manager events).
Privilege Standard userState impact Read-onlyProduction Unknown
Field glossary
Important fields projected from persisted Command guidance.
SERVICE_NAME, TYPE, STATE, WIN32_EXIT_CODE, SERVICE_EXIT_CODE, CHECKPOINT, WAIT_HINTImportant persisted output field; use surrounding guidance for interpretation.
Used in these Topics
Each relation carries both placement role and operational semantic: verifies, configures, troubleshoots, collects evidence, changes state or general.
Evidence boundary
What this output can establish — and where you must not over-claim.
Shows the current state and last exit code of the service.
Does not explain why the service failed; the System event log usually does.
Check the configuration with sc.exe qc <service> and the System log (Service Control Manager events).
Command guidance
Execution context
Standard user
Use when
A service will not start, or hangs in START_PENDING.
Important fields
SERVICE_NAME, TYPE, STATE, WIN32_EXIT_CODE, SERVICE_EXIT_CODE, CHECKPOINT, WAIT_HINT
Common problems
stuck in START_PENDING or STOP_PENDING; non-zero exit code
Operational impact
Read-only.
Technical context
In PowerShell write sc.exe, because "sc" is an alias for Set-Content. Use the service name, not the display name.