Check CCMEXEC service State / Startmode with WMIC script

Sometimes you want to see which servers are running the SMS Agent Service and which ones has the service disabled.

Create a CMD file with this line (one line):

wmic /node:@CCMEXEC.txt /output:CCMEXEC.csv Service where name="CcmExec" Get Name,State,Startmode /format:csv

Put the hostnames into CCMEXEC.txt, one hosname on each line

Run the CMD as Admin and the output will be saved into a nice CCMEXEC.CSV