Check status of a service from the command line

Batch FileI have just had a call you it working and it writing some batch files to upgrade certain machines.  He couldn't remember how to check the status of a service from the command line.

The way I know of and have used in the past is the command sc.

An example would be 

sc query MySQL

You can combine that with findstr to search for STOPPED or STARTED etc.

I am always interested in feedback so please feel free to add any comments, or you can mail me  here.  If you would like to submit a quick tip  with full credit and links back to your site then also feel free to contact me.

Related Posts Plugin for WordPress, Blogger...

Copy text when viewing a file in Quick look

Download your photos from Instagram