标题:确定计算机的 IP 地址 出处:gOxiA=苏繁=SuFan Blog 时间:Sat, 09 Jul 2005 09:51:02 +0000 作者:gOxiA 地址:https://goxia.maytide.net/read.php/868.htm 内容: 描述 返回安装在计算机中的每个支持 IP 的网络适配器的 IP 地址。 脚本代码strComputer = "."Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")Set IPConfigSet = objWMIService.ExecQuery _ ("Select IPAddress from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")For Each IPConfig in IPConfigSet If Not IsNull(IPConfig.IPAddress) Then For i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress) WScript.Echo IPConfig.IPAddress(i) Next End IfNext Generated by Bo-blog 2.1.1 Release