Quantcast
Channel: foreach | Operating systems, scripting, PowerShell and security | jesusninoc.com
Viewing all articles
Browse latest Browse all 410

Searching IP addresses in text files

$
0
0

Write-Host “IP addresses:`n”
Get-ChildItem C:\Users\ -rec -ea SilentlyContinue | ForEach-Object {
Select-String “\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b” -input (Get-ItemProperty -Path $_.PsPath) -AllMatches | ForEach-Object {($_.matches)|Select-Object Value}
}

The post Searching IP addresses in text files appeared first on Scripting and Security.


Viewing all articles
Browse latest Browse all 410

Latest Images

Trending Articles



Latest Images