如何排除虚拟网卡
Dim $strIPAddresses = "", $configDim $WMI = ObjGet("winmgmts:")
Dim $colNic = $WMI.ExecQuery("SELECT * FROM " & "Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
For $config In $colNic
ConsoleWrite("Network Adapter: " & $config.Index)
If IsArray($config.IPAddress) Then
$strIPAddresses = $config.IPAddress
Else
$strIPAddresses = ""
EndIf
ConsoleWrite("IP Address(es): " & $strIPAddresses & @CRLF)
Next
以上代码是获取内网IP的
如何排除虚拟网卡VMware Network Adapter VMnet1和VMware Network Adapter VMnet8
只输出物理网卡的IP?
页:
[1]