Skip to content

Instantly share code, notes, and snippets.

@karthiks
Last active September 14, 2021 13:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karthiks/8e84097149ae946b1ebfff981598015b to your computer and use it in GitHub Desktop.
Save karthiks/8e84097149ae946b1ebfff981598015b to your computer and use it in GitHub Desktop.
Case 3: When you want to list files containing all of texts "abc" AND "pqr" AND "xyz".
Get-ChildItem -Recurse | Select-String -Pattern 'abc' -List | Select-String -Pattern 'pqr' -List | | Select-String -Pattern 'xyz' -List | Select Path
# With pipes '|', we are filtering the result set with additional search terms thus acing like the search for terms are AND conditional.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment