SELECT * FROM events WHERE devicetype=12 AND ((((LOWER("Process Path") LIKE '%\wevtutil.exe' OR LOWER("Process Name") LIKE '%\wevtutil.exe') OR Filename='wevtutil.exe') AND (LOWER(Command) LIKE '%clear-log %' OR LOWER(Command) LIKE '% cl %' OR LOWER(Command) LIKE '%set-log %' OR LOWER(Command) LIKE '% sl %' OR LOWER(Command) LIKE '%lfn:%')) OR (((LOWER("Process Path") LIKE '%\powershell.exe' OR LOWER("Process Path") LIKE '%\powershell_ise.exe' OR LOWER("Process Path") LIKE '%\pwsh.exe') OR (LOWER("Process Name") LIKE '%\powershell.exe' OR LOWER("Process Name") LIKE '%\powershell_ise.exe' OR LOWER("Process Name") LIKE '%\pwsh.exe')) AND ((LOWER(Command) LIKE '%clear-eventlog %' OR LOWER(Command) LIKE '%remove-eventlog %' OR LOWER(Command) LIKE '%limit-eventlog %' OR LOWER(Command) LIKE '%clear-winevent %') OR (LOWER(Command) LIKE '%eventing.reader.eventlogsession%' AND LOWER(Command) LIKE '%clearlog%') OR (LOWER(Command) LIKE '%diagnostics.eventlog%' AND LOWER(Command) LIKE '%clear%'))) OR (((LOWER("Process Path") LIKE '%\powershell.exe' OR LOWER("Process Path") LIKE '%\powershell_ise.exe' OR LOWER("Process Path") LIKE '%\pwsh.exe' OR LOWER("Process Path") LIKE '%\wmic.exe') OR (LOWER("Process Name") LIKE '%\powershell.exe' OR LOWER("Process Name") LIKE '%\powershell_ise.exe' OR LOWER("Process Name") LIKE '%\pwsh.exe' OR LOWER("Process Name") LIKE '%\wmic.exe')) AND LOWER(Command) LIKE '%cleareventlog%')) AND (NOT((("Parent Process Path" IN('C:\Windows\SysWOW64\msiexec.exe', 'C:\Windows\System32\msiexec.exe')) AND LOWER(Command) LIKE '% sl %')))