Keyword in Text File

Version 1

    I had need to check a text file for keywords and did this via Powershell. I share here the script in it's most basic form:



    • Enter the path to the file in the script arguments using the ${IP} variable (eg. \\${IP}\c$\Program Files\example\audit.log)
    • Set the execution mode to 'remote host'
    • Tick the box 'count statistic as difference'
    • Once you run a test you will then get the script output options for 'linecount', set the warning or critical to 'greater than 0'