When you analyze a text log or filter out the type of information, you usually use Where-object. Here's a generic script that illustrates a composite filter:
# Logical AND filter for all keywords
get-content-path C:\windows\WindowsUpdate.log |
Where-object {$_-like ' *successfully installed* '} |
Where-object {$_-like ' *framework* '} |
Out-gridview
# Above example can also be written to one line
# by using The-and operator
# The resulting code Is isn't faster, though, just harder to read
Get-content-path C:\windows\WindowsUpdate.log |
Where-object {($_-like ' *successfully installed* ')-and ($_-like ' *framework* ')} |
Out-gridview
# logical-or (either condition are met) can only, applied in one line
Get-content-path C:\window S\windowsupdate.log |
Where-object {($_-like ' *successfully installed* ')-or ($_-like ' *framework* ')} |
Out-gridview