$Input_File = ‘C:\Temp\Input_File.txt’
$Output_File = ‘C:\Temp\Extracted_IP_Addresses.txt’
$RegEx = ‘\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b’
Select-String -Path $Input_File -Pattern $RegEx -AllMatches | % { $_.Matches } | % { $_.Value } > $Output_File