|
match question How would i do a statement to make sure an IP does not match an IP in a .txt
file i have?
Exampe:
$noAlertFile = get-content "noalert.txt"
$ip = "172.16.98.100"
if ($ip -notmatch $noAlertFile) {process} else {otherwise "do not alert"}
The noalert.txt file contains a list of IPs, what is a good way to see if
the $IP does not exist in the $noAlertFile object?
Thanks,
Ripp |