Manage Learn to apply best practices and optimize your operations.

Top Windows command-line commands

5/6

Query the status of services with sc query state= all

Source:  iStock/RUSSELLTATEdotCOM
Visual Editor: Sarah Evans/TechTarget

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.

View All Photo Stories

Join the conversation

1 comment

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

How often do you perform security audits?
Cancel

-ADS BY GOOGLE

SearchVirtualDesktop

SearchWindowsServer

SearchExchange

Close