I have a function:
function LocateIP ([String] $IPPool, [String] $IP) {
return $IPPool.contains($IP)
}
where $IPPool would be a file with lots of ips and $IP would be, of course, the IP. function need to return true if $ip is inside the ippool.
This works great, problem arise when when i try to iterate a file of ips and then work line by line and running LocateIP function on it.
if the file holds more than 50k of ips and i do iterate line by line and checking, that could take lots of time, and, of course, more than that it gets much worse.
can i find another way that will help me to work with bigger files?