I am trying to create a rule that reads a txt file on workstations and if it finds the matching words so I can create a report of workstations that match. The cusomt inventory rule that I have in place is

ShellCommandTextReturn(cmd /c type c:\Folder\file.txt | find "text")

I am not returning any results, can someone point me in the right direction


0 Comments   [ + ] Show Comments


  • This content is currently hidden from public view.
    Reason: Removed by member request
    For more information, visit our FAQ's.
Please log in to comment



Please log in to comment
I use this one to search the hosts files on machines for anyline that does not begin with a #

ShellCommandTextReturn(cmd /c echo off & for %g in (C:\Windows\System32\drivers\etc\hosts) do (findstr /b /v /c:"#" %g))

this one reads the bios text file I created with the CCTK to list the bootorder on machines

ShellCommandTextReturn(cmd /c @echo off && for %g in (c:\programdata\dell\kace\user\bios.txt) do (findstr /b /c:"bootorder" %g))
Answered 04/06/2015 by: SMal.tmcc
Red Belt

Please log in to comment

thank you for the help, I have been playing with this all day and not been able to get it to work properly.

ShellCommandTextReturn(cmd /c type C:\celerant\RMS6\celMainlog.txt findstr /I "port=8601")

 I have also tried the examples given but not been able to get it to pull the information. if I run this command via command line it finds the information I am looking for. Thanks for the help

Answered 04/06/2015 by: joshuaer
Senior Yellow Belt

  • can you email that file with the entry and I will give you the exact verbiage to use
    • thank you for your help, I have emailed you the file
  • (cmd /c @echo off && for %g in (celMainLog.txt) do (findstr /c:"PORT=8580" %g))
Please log in to comment
Answer this question or Comment on this question for clarity