Hi,
I have a list of values from a command below:
$a = get-content c:\test.txt | Select-String 'test'
which outputs;
test1
test2
test3
I'd like to then perform another select-string query using these values on a different file, similar to
get-content c:\new.txt | select-string -pattern $a | add-content c:\report.txt
Can someone help how I can read in the contents of $a (test1, test2 and test3) a line at a time?
Thanks