to do this you need to be using Windows Server 2003, Windows XP or Windows Vista (Windows 2000 doesn't support it)
open a command prompt and paste this
wmic.exe path win32_NetworkAdapterConfiguration get /format:htable > win32_NetworkAdapterConfiguration.html
This will create a new file called win32_NetworkAdapterConfiguration.html which you can open in a Web browser (IE please, Firefox won't render this correctly)
as you can see from the samples they not only give the ip address but lots more info like MAC address and so on
now, this will only reveal your LOCAL ip address, ie: if you are behind a router (or dhcp server) then that ip is the one it will reveal, so if you want your real WAN (internet or wide area network) ip address then you'll need another script...
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
to do this you need to be using Windows Server 2003, Windows XP or Windows Vista (Windows 2000 doesn't support it)
open a command prompt and paste this
This will create a new file called win32_NetworkAdapterConfiguration.html which you can open in a Web browser (IE please, Firefox won't render this correctly)
here's a sample of the file
win32_NetworkAdapterConfiguration.html
Under the IPAddress column, you'll see the IP address of the current Network adapter, you may see many listed (PPOE and more)
here's the same query in text format
win32_NetworkAdapterConfiguration.txt
as you can see from the samples they not only give the ip address but lots more info like MAC address and so on
now, this will only reveal your LOCAL ip address, ie: if you are behind a router (or dhcp server) then that ip is the one it will reveal, so if you want your real WAN (internet or wide area network) ip address then you'll need another script...
cheers
anyweb
Share this post
Link to post
Share on other sites