The service controller (sc) command is a rich command you can use to start, stop, and manipulate services from the command line. This allows you to perform many of the same functions from the command line as you can do via the Services console.
Lists all running services and drivers. The result on the left shows the results for a single service (the netlogon service), but the actual output shows details on all running services and drivers. The output can be quite extensive. Of course, you can capture the entire output with the redirect (>) symbol assc query > services.txt
Tip
The servicename shows the name of the service that you can use in other commands.
sc query state= all | inactive
C:\>sc query state= all
C:\>sc query state= inactive
Lists all servicesincluding servicesstopped, running, or paused.
Note
There is no space between state and =(state=), and there is a space between = and all (= all).
You can use state= inactive to list only services that are stopped or state= allto list all services, including those that are running and those that are stopped.
No comments:
Post a Comment