How to get the IP Address for your Local Area Connection on Windows Server?
Posted
by
Geo
on Server Fault
See other posts from Server Fault
or by Geo
Published on 2009-07-31T15:14:53Z
Indexed on
2012/08/29
3:40 UTC
Read the original article
Hit count: 239
I want to create a batch or vbs file that will put together a url and executed. Part of that url needs to be the actual ip address of the machine. How I am able to get that IP address in a variable to include it on the script?
EDIT 1:
I found out that the command below will give me the IP Address, but still don't know how to get that value into a variable to use it in a script.
c:\> wmic NICCONFIG WHERE IPEnabled=true GET IPAddress /format:csv
Node,IPAddress
IP-0AFB,{10.25.5.2}
© Server Fault or respective owner