Custom invetory rule question
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
Thanks
Answers (3)
https://technet.microsoft.com/en-us/library/bb490907.aspx
http://ss64.com/nt/findstr.html
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))
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