 <p>This should work for you. Check out the in-line comments.</p> <pre><code># 1. Let's assume the folder c:\test contains a bunch of plain text files # and we want to find only the ones containing 'foo' AND 'bar' $ItemList = Get-ChildItem -Path c:\test -Filter *.txt -Recurse; # 2. Define the search terms $Search1 = 'foo'; $Search2 = 'bar'; # 3. For each item returned in step 1, check to see if it matches both strings foreach ($Item in $ItemList) { $Content = $null = Get-Content -Path $Item.FullName -Raw; if ($Content -match $Search1 -and $Content -match $Search2) { Write-Host -Object ('File ({0}) matched both search terms' -f $Item.FullName); } } </code></pre> <p>After creating several test files, my output looks like the following:</p> <pre><code>File (C:\test\test1.txt) matched both search terms </code></pre>