cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 8

PowerShell Log Parser

Jump to solution

I would like to be able to use the PowerShell Log Parser to search files for certain error's and have them kick off an alert. The problem is I need it to be able to match on a phrase, and not just a single word. Apparently the PowerShell Log Parser doesn't handle spaces, because it is matching on a single word not the whole phrase. Does anyone have any idea as to how I can do this, either with a modification to the PowerShell script or a different way entirely. I have already opened a ticket with support, but they haven't been helpful as of yet.

1 Solution

After some testing I discovered that we can use spaces in search regex.  Example:

Example of script arguments (search string should be written without double brackets):
d:\powertest.txt, I want to find this string,total,0

View solution in original post

2 Replies
Level 12

Try either including the entire string in quotations or putting a back tick ( ` ) in front of the space.

0 Kudos

After some testing I discovered that we can use spaces in search regex.  Example:

Example of script arguments (search string should be written without double brackets):
d:\powertest.txt, I want to find this string,total,0

View solution in original post