Top Windows command-line commands
Anytime you want to know what services are installed on a computer and find out which ones are active, you can use sc query state= all to find a complete list. If the computer in question is remote, you should use sc \\computername query state= all.
If you're looking for a specific service, you can use sc query service_name. To find the configuration information for a specific service, you can use sc qc service_name. To stop a particular service from running on a computer, use sc \\computername stop service_name. And if you have to start a service on a computer, you can use sc \\computername start service_name.
Another query command that can come in handy if, for example, you have to see the results of a security audit is auditpol /get /category:*.With this command, you can ask for and establish audit settings on a local computer. To see the same results in CSV format you can use auditpol /get /category:* /r.