other question doesn't answer this question, that comes up blank.
I have an array of 8 items I need to search through more than 100 files. So basically like a loop within a loop but with Powershell (newbie sorry).
I'm in the directory of the 100 files. I have built so far:
Get-ChildItem -path . -name | Get-Content | Select-String -Pattern $data
which as far as I understand: gets the list of files, piped to Get-Content to read all the file data, piped to select the pattern of the array items.
Lots of data out ofcourse, Get-Content needs to not be filtered to search it, but I only need to know which $data item was a match, and in which file it was found.
I think it hits true but then gives the the full content of the search I can't tell.
Don't know if we can do this all one liner or if it needs to be a script.
Any help or pointers to same much appreciated