first part works ok. but i try adding where obj to filter the unwanted strings and it still includes them. Here im searching for lines with SERVER and trying to exclude lines with INC
get-childitem $folder -filter "*.lic"|foreach-object {select -Property name; Select-String "SERVER " $_.FullName|where-object {$_.Line -notcontains "INC"}}
submitted by /u/vwpcs
[link] [comments]
The post Looking to search files for a string and then exclude lines with a different string appeared first on How to Code .NET.