Currently on version 4.0. I am easily able to find files containing one string. Trying to do something slightly more complex with two strings on different lines has not worked out. The problem is apparently due to the way lines are evaluated individually and results are piped as objects between commands making the obvious solutions do not work.
# Works, so simple
Get-ChildItem | Select-String -Pattern "Test1" -List | Select Path
# Fail
Get-ChildItem | Select-String -Pattern "Test1.+Test2" -List | Select Path
# Fail
Get-ChildItem | Select-String -Pattern "Test1" -List | Select-String -Pattern "Test2" -List | Select Path
Conceptually this is so simple, but I've been spinning my wheels on finding a solution. Might be easier in newer version but not able to update on server involved. I could write a script to get to the solution in Python, but at this point I want to make PowerShell do it out of spite.
Knowing what is returned from each command, how to get underlying object data, how to then pipe that data to subsequent commands, etc has repeatedly been an issue for me with PowerShell :(