<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[gOxiA=苏繁=SuFan Blog]]></title> 
<link>https://goxia.maytide.net/index.php</link> 
<description><![CDATA[gOxiA,苏繁,sufan,Microsoft MVP]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[gOxiA=苏繁=SuFan Blog]]></copyright>
<item>
<link>https://goxia.maytide.net/read.php/868.htm</link>
<title><![CDATA[确定计算机的 IP 地址]]></title> 
<author>gOxiA &lt;sufan_cn@msn.com&gt;</author>
<category><![CDATA[PowerShell 和脚本]]></category>
<pubDate>Sat, 09 Jul 2005 01:51:02 +0000</pubDate> 
<guid>https://goxia.maytide.net/read.php/868.htm</guid> 
<description>
<![CDATA[ 
	<span><div><p><strong>描述</strong></p></div><div><p>返回安装在计算机中的每个支持 IP 的网络适配器的 IP 地址。</p></div><div><p><br /><strong>脚本代码<br /></strong>strComputer = &quot;.&quot;<br />Set objWMIService = GetObject(&quot;winmgmts:&#92;&#92;&quot; &amp; strComputer &amp; &quot;&#92;root&#92;cimv2&quot;)<br />Set IPConfigSet = objWMIService.ExecQuery _<br />&nbsp; &nbsp;(&quot;Select IPAddress from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE&quot;)<br />For Each IPConfig in IPConfigSet<br />&nbsp; &nbsp;If Not IsNull(IPConfig.IPAddress) Then <br />&nbsp; &nbsp; &nbsp; &nbsp;For i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WScript.Echo IPConfig.IPAddress(i)<br />&nbsp; &nbsp;Next<br />&nbsp; &nbsp;End If<br />Next</p></div></span>
]]>
</description>
</item>
</channel>
</rss>