I have 300 CSV files all separated in a directory.
I want to get one specific criteria from each CSV and put it into another using PowerShell.
This is the line I have, but doesn't seem to work.
Get-ChildItem -Filter "*Results.csv" | Get-Content | Where-Object {$_.NAME -eq "Cage,Johnny"} | Add-Content "test.csv"
I filtered for the specific CSVs I wanted in my directory with gci, Got the content of each using Get-Content and Where the value is Johnny Cage in the NAME column, and Add-Content into a test.csv file but doesn't work. Any help would be great!