I'm trying to select a string from a debug log which contains a specific string but does not contain a different string.
I guess this is simple but I'm totally new to powershell.
Keep getting same error. "missing statement block after if condition"
Tried a few variations but cant get it to work.
Code i'm trying is:
Get-Content -Path "~\filepath\debug.log"-Wait | Select-String "String 1" {if (notcontain (select-string "String 2"))}
Thanks in advance for anyone who can help with this!