Quantcast
Channel: Fastest method to determine my PC's IP address (Windows) - Super User
Viewing all articles
Browse latest Browse all 17

Answer by Amadeusz Wieczorek for Fastest method to determine my PC's IP address (Windows)

$
0
0

Type this into a .bat file. You can then create a shortcut to it and place it in the taskbar, start menu, or assign a hotkey.

ipconfig | find "IPv4" | find /V "192.168." | CLIP

What it does: First find returns all the lines that contain IPv4. If you have multiple network adapters, from example from VMWare, you may want to exclude them. That's where find /V comes into play, it finds all lines that do not contain given string. For example, that's what I get after the first find:

>ipconfig | find "IPv4"   IPv4 Address. . . . . . . . . . . : 134.32.72.86   IPv4 Address. . . . . . . . . . . : 192.168.229.1   IPv4 Address. . . . . . . . . . . : 192.168.230.1

Finally, CLIP copies the output to the clipboard, so you will be left with

>    IPv4 Address. . . . . . . . . . . : 134.32.72.86

If that's not enough maybe someone else can refine it with fancy search patterns.


Viewing all articles
Browse latest Browse all 17

Trending Articles