Which command-line tool is used to view all services running on a Windows system?

Study for the SANS560 GIAC Penetration Tester (GPEN) Test. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Multiple Choice

Which command-line tool is used to view all services running on a Windows system?

Explanation:
Viewing Windows services from the command line is done with the Service Control utility (sc.exe) and its query command. To see every service, including those not currently running, you pass a filter that selects all states: state=all. This tells sc to report services no matter whether they’re running, stopped, paused, or in some other state, giving you the complete list. Without this filter, the query tends to return only services in the active or default state, so you wouldn’t get the full view. The other forms either don’t apply the proper filter or use invalid syntax, so they don’t produce the comprehensive list that state=all does.

Viewing Windows services from the command line is done with the Service Control utility (sc.exe) and its query command. To see every service, including those not currently running, you pass a filter that selects all states: state=all. This tells sc to report services no matter whether they’re running, stopped, paused, or in some other state, giving you the complete list. Without this filter, the query tends to return only services in the active or default state, so you wouldn’t get the full view. The other forms either don’t apply the proper filter or use invalid syntax, so they don’t produce the comprehensive list that state=all does.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy