Querying if a service is running / paused / stopped
Hi, I'm trying to create a report in SCCM 2007 to see which PCs have the service McShield set to "Paused". I have snagged a query that displays a list of all computers with the service installed (below), but the "State" and "Started" column always remains completely blank - as well, if I add any condition to the WHERE statement referencing either, it acts as a null value as well. Am I overlooking something? I'm not great with SQL, but it seems like it should work.Query:SELECT GS.Name0 as 'PC Name', GSS.DisplayName0 as 'Service', GSS.StartMode0 as 'Startup', GSS.State0 as 'State', GSS.Started0 as 'Started'FROM v_GS_SERVICE GSS, v_GS_COMPUTER_SYSTEM GSWhere GSS.ResourceID = GS.ResourceID AND GSS.DisplayName0 = 'McAfee McShield'ORDER BY GS.Name0, GSS.DisplayName0
September 15th, 2009 5:47pm

Definately what I needed to do - thanks. That's a huge part of SCCM that I've overlooked.Thanks for the script, too!
Free Windows Admin Tool Kit Click here and download it now
September 16th, 2009 11:29am

Garth Jones, I know this is closed but I wanted to know which field needs to be set as True in sms_def.mof. Please help me.
August 31st, 2012 5:03am

I couldn't find this entry in sms_mof [SMS_Report (TRUE) ] string State; Let me know where can I find this.
Free Windows Admin Tool Kit Click here and download it now
August 31st, 2012 7:49am

I tried but after SMS_mof file is saved, its getting reverted back to original state Let me know what to do.
August 31st, 2012 9:35am

I copy pasted, I typed manually etc..but still same, no idea what is wrong. under this class Win32_Service & end of class statement I used this [SMS_Report (TRUE) ] string State;
Free Windows Admin Tool Kit Click here and download it now
September 1st, 2012 12:51am

ok I got it, there was already a "string State" text in the class, I was trying to add extra entry, that's the reason it was failing. Now I could get service status details.
September 1st, 2012 1:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics