描述
返回安装在计算机中的每个支持 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 if
next
如对本文有疑问,
点击进行留言回复!!
相关文章:
-
-
-
-
-
-
-
-
用vbs实现文本循环读取
因为测试中需要读取一批url数据进行浏览,其实使用qtp本身的table能实现多种读取方式,但是因为需要tabel是使用excel保存的,在没有...
[阅读全文]
-
-
-
网友评论