How do you inspect and control Windows services from the command line?
Answer
Command Prompt can use `sc query <service>` to inspect service state and `sc start` or `sc stop` to control it. PowerShell provides `Get-Service`, `Start-Service`, `Stop-Service` and `Restart-Service`. A service reported as Running is only one signal; verify the process, listener, dependency and application health before concluding the service works.
Strong answer includes
- knows sc query and PowerShell service cmdlets
- service state is not equivalent to endpoint health
- checks dependencies and logs before unnecessary restarts
Practical example
A Windows API service shows Running, but tests get connection refused. Check the service, then verify whether its process is actually listening on the expected port and inspect Event Log or application logs before restarting it.