Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Help with using Select-String

$
0
0

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. 


Viewing all articles
Browse latest Browse all 6937

Trending Articles