Finding IP Address

by Nov 8, 2012

There are various ways to determine the IP address that is assigned to your machine. Here is a rather unusual approach that uses text operators to filter the information out of the results provided by ipconfig.exe.

This is not the most solid way of getting to an IP address. It is, however, an interesting brain teaser illustrating the power of PowerShell:

PS> foreach($ip in (ipconfig) -like '*IPv4*') { ($ip -split ' : ')[-1]}

Twitter This Tip! ReTweet this Tip!