| There isn't currently a drop-down choice for file size when creating a user-defined Configuration Group. However, there is a workaround using a VBscript. You can create and assign (as a Command Task) a VB script that will calculate a specified file's size and store that value in an INI file on the managed PC. You can then create a user-defined Configuration Group based on the value written to the INI file. For example, the following VB script allows you to find out the size of the paging file: Create the following lines in a text editor, and save the file with the extension .vbs: Const filename = "C:\pagefile.sys" Dim objFSO, objFile, objINIFile Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.GetFile(filename) Set objINIFile = objFSO.CreateTextFile("C:\Program Files\New Boundary\Client\PagefileSize.ini", 2) objINIFile.WriteLine "[FileSize]" objINIFile.WriteLine "Bytes=" & objFile.Size objINIFile.Close This script will calculate the size of the "C:\PageFile.sys" file and then store the value in a file called PagefileSize.ini in the Prism Client folder. The next step is to create a User-defined Configuration Group to query the INI file. Let’s say you want to find out all the systems where the pagefile.sys is over 1GB in size. Use the following rule as an example: <INI Value> "C:\Program Files\New Boundary\Client\PagefileSize.ini\\FileSize\\Bytes" > 1000000000 Make sure that there aren't any quote symbols around the numeric value in the rule, otherwise it will be treated as a string. The Configuration Group will populate with any computer that has an INI file named PagefileSize.ini in the C:\Program Files\New Boundary\Client folder, has a section called [PageFileSize] and a “Bytes” value greater than 1000000000. Note: When PageFile.sys size changes, the PagefileSize.ini will not automatically reflect that change. The VB script would have to be run again to get the latest size. You could consider setting it up as a recurring task, perhaps monthly. Please contact us directly at support@newboundary.com if you would like some assistance in creating your script and creating the configuration group(s).
New Boundary Technologies Support support@newboundary.com |