Obtaining an IP address using @WMI and WMIQUERY

While you can use @IPADDRESS to obtain the IP address of a specific host, you can also use @WMI and WMIQUERY. Example;

echo %@wmi[root\cimv2,"SELECT ProtocolAddress FROM Win32_Pingstatus where address='jpsoft.com'"]

wmiquery root\cimv2 "SELECT ProtocolAddress FROM WIN32_Pingstatus where address='jpsoft.com'"
Yes, @IPADDRESS returns the IP address much faster than @WMI and WMIQUERY, but this is just an example of doing the same thing using an alternate method.

You can see the other properties of Win32_PingStatus by visiting http://msdn.microsoft.com/en-us/library/aa394350%28v=vs.85%29.aspx