New to relevance - need to pull some WMI information

(imported topic written by pdentico91)

Hi,

I have a script that sets the Event Log file sizes and need to be able to convert what I am looking for in the script to relevance language.

The excerpt from the script is:

Set objWMIService = GetObject(“winmgmts:{impersonationLevel=impersonate}!\” & strComputer & “\root\cimv2”)

Set colLogFiles = objWMIService.ExecQuery (“Select * from Win32_NTEventLogFile”)

For Each objLogfile in colLogFiles

Select Case LCase (objLogFile.LogFileName)

Case “security”

intMaxFileSize = 203423744

I need to create relevance to find machines where the Security event log is not equal to “203423744” so I know which machines need this script run on them.

Any help would be appreciated.

Thanks,

Pete

(imported comment written by Lee Wei)

Pete,

Welcome to the Forum. I will get you started and there might be different pieces needed.

Here is a relevance query that will return True for those computers where the security event log is not equal to “203423744”.

(integer value of selects “MaxFileSize from win32_nteventlogfile where LogFileName=‘Security’” of wmi) != 203423744

In the relevance language, you cannot run the script, so you will have to put your VBScript into the Action Script.