Created
February 1, 2013 16:30
-
-
Save ddhahn/4692388 to your computer and use it in GitHub Desktop.
Filters a list of IP addresses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
del "c:\temp\vpn_machines.txt" | |
$machines = gc "c:\temp\hosts" |% {$_.split("`t")[0]} | |
foreach ($machine in $machines) { | |
if ($machine.startswith('10.54')) { | |
Out-File -InputObject $machine "c:\temp\vpn_machines.txt" -Encoding "ASCII" -append | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment