I am new to using PowerShell and am trying to use Select-String to find lines in a text file that have a match with any email in a list of emails. The following works:
Select-String -path C:\Users\tadcock\Desktop\user_data_IUHealth_input.txt -pattern aabegunde1@iuhealth.org,aadams2@iuhealth.org,aadelsperger@iuhealth.org
My problem is my list contains over 6000 emails. Is there a way to use a file as the argument for
-pattern?
Thanks.