I have a huge csv file with about 13M rows and about 50 columns (File #1). I have another file with about 11k rows that's a list of IP addresses (File #2), which is also one of the 50 columns in the first file. How do I go about filtering File #1 so that the output contains only those rows where IP addresses from File #2 is found?
Here's what I've tried so far but it's been running for 12 hours and counting:
$IP = Get-Content -Path C:\Documents\File2.txt
Import-Csv C:\Documents\File1.csv | Where-Object {$_.IP -eq $IP} | Export-csv -Path C:\Documents\File3.csv -NoTypeInformation