<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: get IP address using VB script in Operating System - Microsoft</title>
    <link>https://community.hpe.com/t5/operating-system-microsoft/get-ip-address-using-vb-script/m-p/3877686#M7556</link>
    <description>In VBS for web pages, the command is request.servervariables("remote_host"). This variable holds the address of the remotely connected browser.&lt;BR /&gt;&lt;BR /&gt;Use the following array to iterate through all the server variables and their values:&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE&gt;&lt;BR /&gt;      &lt;TBODY&gt;&lt;TR&gt;&lt;BR /&gt;           &lt;TD&gt;&lt;BR /&gt;                &lt;B&gt;Server Varriable&lt;/B&gt;&lt;BR /&gt;           &lt;/TD&gt;&lt;BR /&gt;           &lt;TD&gt;&lt;BR /&gt;                &lt;B&gt;Value&lt;/B&gt;&lt;BR /&gt;           &lt;/TD&gt;&lt;BR /&gt;      &lt;/TR&gt;&lt;BR /&gt;&lt;BR /&gt;      &amp;lt;% For Each name In Request.ServerVariables %&amp;gt;&lt;BR /&gt;      &lt;TR&gt;&lt;BR /&gt;           &lt;TD&gt;&lt;BR /&gt;                &amp;lt;%= name %&amp;gt;&lt;BR /&gt;           &lt;/TD&gt;&lt;BR /&gt;           &lt;TD&gt;&lt;BR /&gt;                &amp;lt;%= Request.ServerVariables(name) %&amp;gt;&lt;BR /&gt;           &lt;/TD&gt;&lt;BR /&gt;      &lt;/TR&gt;&lt;BR /&gt;      &amp;lt;% Next %&amp;gt;&lt;BR /&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
    <pubDate>Wed, 11 Oct 2006 13:01:20 GMT</pubDate>
    <dc:creator>Chad Miller_5</dc:creator>
    <dc:date>2006-10-11T13:01:20Z</dc:date>
    <item>
      <title>get IP address using VB script</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/get-ip-address-using-vb-script/m-p/3877681#M7551</link>
      <description>hi&lt;BR /&gt;&lt;BR /&gt;howto get IP address of the WIN2000 workstation using VB script ?&lt;BR /&gt;&lt;BR /&gt;I have this VB script:&lt;BR /&gt;&lt;BR /&gt;Set WshNetwork = WScript.CreateObject("WScript.Network")&lt;BR /&gt;WScript.Echo "You Computer Name = " &amp;amp; WshNetwork.ComputerName&lt;BR /&gt;&lt;BR /&gt;to get the Computer Name, but howto add the line to get the IP address ?&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Oct 2006 09:35:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/get-ip-address-using-vb-script/m-p/3877681#M7551</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2006-10-10T09:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: get IP address using VB script</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/get-ip-address-using-vb-script/m-p/3877682#M7552</link>
      <description>I don't use VB so cannot help you there, but can you in some way incorporate the command:&lt;BR /&gt;&lt;BR /&gt;ipconfig/all|find/I"IP ADDRESS"&lt;BR /&gt;&lt;BR /&gt;and take only the part you require.&lt;BR /&gt;&lt;BR /&gt;The IP address is also hidden away in the registry, but looks like it comes under a sub key which is based on a GUID type string.&lt;BR /&gt;&lt;BR /&gt;You may also get problems with computers with several net adapters.&lt;BR /&gt;&lt;BR /&gt;Sorry can't be more help.</description>
      <pubDate>Tue, 10 Oct 2006 10:35:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/get-ip-address-using-vb-script/m-p/3877682#M7552</guid>
      <dc:creator>Marc Carney</dc:creator>
      <dc:date>2006-10-10T10:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: get IP address using VB script</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/get-ip-address-using-vb-script/m-p/3877683#M7553</link>
      <description>IP Address is an array.  Here's an example that might help.&lt;BR /&gt;&lt;BR /&gt;'---- get ip addresses and mac address of available NIC's &lt;BR /&gt;strComputer = "."&lt;BR /&gt;Set SWBemlocator = CreateObject("WbemScripting.SWbemLocator")&lt;BR /&gt;Set objWMIService = GetObject("winmgmts:\\" &amp;amp; strComputer &amp;amp; "\root\cimv2")&lt;BR /&gt;Set cItems = objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfiguration",,48)&lt;BR /&gt;For Each objItem in cItems&lt;BR /&gt; &lt;BR /&gt; For Each propValue in objItem.IPAddress&lt;BR /&gt;  MyIP = objItem.IPAddress(0)&lt;BR /&gt;  MyMac= objItem.MACAddress(0)&lt;BR /&gt;  strReportLine = strReportLine &amp;amp; " IPMAC:"&amp;amp;MyIP&amp;amp;","&amp;amp;MyMac&amp;amp;","&lt;BR /&gt;  &lt;BR /&gt; ' objOutputFile.WriteLine(MyIP&amp;amp;","&amp;amp;MyMac&amp;amp;",")  &lt;BR /&gt; ' Console.WriteLine(MyIP&amp;amp;","&amp;amp;MyMac)&lt;BR /&gt; ' Wscript.WriteLine(MyIP&amp;amp;","&amp;amp;MyMac)&lt;BR /&gt; ' WScript.Echo "IPAddress: " &amp;amp;  MyIP &amp;amp; "MACaddress  " &amp;amp;MyMac&lt;BR /&gt; &lt;BR /&gt; Next&lt;BR /&gt; &lt;BR /&gt;Next&lt;BR /&gt; &lt;BR /&gt;objOutputFile.WriteLine(strReportLine)&lt;BR /&gt;objOutputFile.Close&lt;BR /&gt; &lt;BR /&gt;Set objFileSystem = Nothing&lt;BR /&gt; &lt;BR /&gt;Jon</description>
      <pubDate>Tue, 10 Oct 2006 11:21:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/get-ip-address-using-vb-script/m-p/3877683#M7553</guid>
      <dc:creator>Jon Finley</dc:creator>
      <dc:date>2006-10-10T11:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: get IP address using VB script</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/get-ip-address-using-vb-script/m-p/3877684#M7554</link>
      <description>On the Domain Server,&lt;BR /&gt;Go to my computer and right click on it.&lt;BR /&gt;Then go to Manage.&lt;BR /&gt;Then go to DNS&lt;BR /&gt;Then go to forward lookup zone&lt;BR /&gt;Then the systems and IP are listed on the right.&lt;BR /&gt;Otherwise my AV program lists them.&lt;BR /&gt;You are using DHCP ?</description>
      <pubDate>Wed, 11 Oct 2006 10:11:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/get-ip-address-using-vb-script/m-p/3877684#M7554</guid>
      <dc:creator>Ken wanderer</dc:creator>
      <dc:date>2006-10-11T10:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: get IP address using VB script</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/get-ip-address-using-vb-script/m-p/3877685#M7555</link>
      <description>Get your internal LAN IP Address...&lt;BR /&gt;On Error Resume Next&lt;BR /&gt;strComputer = "."&lt;BR /&gt;Set objWMIService = GetObject("winmgmts:\\" &amp;amp; strComputer &amp;amp; "\root\CIMV2")&lt;BR /&gt;Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration")&lt;BR /&gt;&lt;BR /&gt;For Each objItem In colItems&lt;BR /&gt; For Each objValue In objItem.IPAddress&lt;BR /&gt;  If objValue &amp;lt;&amp;gt; "" Then&lt;BR /&gt;   WScript.Echo "Description -- " &amp;amp; objItem.Description &amp;amp; vbcrlf &amp;amp; "IPAddress -- " &amp;amp; objValue &amp;amp; vbcrlf &amp;amp; "MAC: " &amp;amp; objItem.MACAddress&lt;BR /&gt;  End If&lt;BR /&gt; Next&lt;BR /&gt;Next&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Get your External Public IP...&lt;BR /&gt;Call EnumPublicIP()&lt;BR /&gt;&lt;BR /&gt;Sub EnumPublicIP()&lt;BR /&gt; const URL = "&lt;A href="http://xml.showmyip.com/" target="_blank"&gt;http://xml.showmyip.com/&lt;/A&gt;"&lt;BR /&gt; set xmldoc = CreateObject("Microsoft.XMLDOM")&lt;BR /&gt; xmldoc.async=false&lt;BR /&gt; xmldoc.load(URL)&lt;BR /&gt; &lt;BR /&gt; for each x in xmldoc.documentElement.childNodes&lt;BR /&gt;  if x.NodeName = "ip" then&lt;BR /&gt;   myip = x.text&lt;BR /&gt;  end if&lt;BR /&gt;  if x.NodeName = "host" then&lt;BR /&gt;   myhost = x.text&lt;BR /&gt;  end if&lt;BR /&gt;  if x.NodeName = "timestamp" then&lt;BR /&gt;   mytime = x.text&lt;BR /&gt;  end if&lt;BR /&gt; next&lt;BR /&gt; &lt;BR /&gt; myinfo = myip &amp;amp; vbCRLF &amp;amp; myhost &amp;amp; vbCRLF &amp;amp; mytime&lt;BR /&gt; &lt;BR /&gt; wscript.echo "This is your Public Foreward Facing IP Address: " &amp;amp; vbcrlf &amp;amp;  myinfo&lt;BR /&gt;End Sub</description>
      <pubDate>Wed, 11 Oct 2006 12:18:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/get-ip-address-using-vb-script/m-p/3877685#M7555</guid>
      <dc:creator>Gene Laoyan</dc:creator>
      <dc:date>2006-10-11T12:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: get IP address using VB script</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/get-ip-address-using-vb-script/m-p/3877686#M7556</link>
      <description>In VBS for web pages, the command is request.servervariables("remote_host"). This variable holds the address of the remotely connected browser.&lt;BR /&gt;&lt;BR /&gt;Use the following array to iterate through all the server variables and their values:&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE&gt;&lt;BR /&gt;      &lt;TBODY&gt;&lt;TR&gt;&lt;BR /&gt;           &lt;TD&gt;&lt;BR /&gt;                &lt;B&gt;Server Varriable&lt;/B&gt;&lt;BR /&gt;           &lt;/TD&gt;&lt;BR /&gt;           &lt;TD&gt;&lt;BR /&gt;                &lt;B&gt;Value&lt;/B&gt;&lt;BR /&gt;           &lt;/TD&gt;&lt;BR /&gt;      &lt;/TR&gt;&lt;BR /&gt;&lt;BR /&gt;      &amp;lt;% For Each name In Request.ServerVariables %&amp;gt;&lt;BR /&gt;      &lt;TR&gt;&lt;BR /&gt;           &lt;TD&gt;&lt;BR /&gt;                &amp;lt;%= name %&amp;gt;&lt;BR /&gt;           &lt;/TD&gt;&lt;BR /&gt;           &lt;TD&gt;&lt;BR /&gt;                &amp;lt;%= Request.ServerVariables(name) %&amp;gt;&lt;BR /&gt;           &lt;/TD&gt;&lt;BR /&gt;      &lt;/TR&gt;&lt;BR /&gt;      &amp;lt;% Next %&amp;gt;&lt;BR /&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 11 Oct 2006 13:01:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/get-ip-address-using-vb-script/m-p/3877686#M7556</guid>
      <dc:creator>Chad Miller_5</dc:creator>
      <dc:date>2006-10-11T13:01:20Z</dc:date>
    </item>
  </channel>
</rss>

