I am trying to find all files, which does not contains a selected string. Find files which contains is easy:
gci | select-string \"something\"
I'm not sure if it can be done without the foreach-object but this works:
foreach-object
gci |foreach-object{if (-not (select-string -inputobject $_ -Pattern "something")){$_}}