Threat Picture

Latest Cybersecurity News

How to Get All IP Addresses From a File Using RegEx and PowerShell

No grep on Windows? A Linux admin's workaround for pulling every unique IP address out of a text file with PowerShell.
By Charles Joseph · Updated
Watercolor laptop with three example IPv4 addresses listed in a PowerShell console.
PowerShell can extract IP addresses from text and reduce the results to a unique list.
Share
Share
Copy Link