mainguy
01-13-2006, 02:13 PM
I am trying to get a list of virtual adapters in a team using Intel WMI. It doesn't work. I don't know how to associate to IANet_LogicalEthernetAdapter to IANet_TeamOfAdapters. Please let me know if you could help.
This is for the Intel(R) PRO/1000 MT Dual Port Server Adapter
strComputerName = "."
Set objIntelWMIService = GetObject( "winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputerName & "\root\IntelNCS2" )
Set colAdapterTeams = objIntelWMIService.ExecQuery( "SELECT * FROM IANet_TeamOfAdapters" )
For Each objAdapterTeam In colAdapterTeams
Wscript.Echo "AdapterCount = " & objAdapterTeam.AdapterCount
Wscript.Echo "MaxAdapterCount = " & objAdapterTeam.MaxAdapterCount
Wscript.Echo "MFOEnabled = " & objAdapterTeam.MFOEnabled
Wscript.Echo "TeamingMode = " & objAdapterTeam.TeamingMode
Wscript.Echo "Caption = " & objAdapterTeam.Caption
Wscript.Echo "CreationClassName = " & objAdapterTeam.CreationClassName
Wscript.Echo "Name = " & objAdapterTeam.Name
Wscript.Echo ""
Set colLogicalAdapters = objIntelWMIService.ExecQuery( "ASSOCIATORS OF " & _
"{IANet_TeamOfAdapters.Name=""" & objAdapterTeam.Name & """} " & _
"WHERE AssocClass = IANet_NetworkVirtualAdapter" )
For Each objLogicalAdapter in colLogicalAdapters
Wscript.Echo "OriginalDisplayName = " & objLogicalAdapter.OriginalDisplayName
Wscript.Echo "Per address = " & objLogicalAdapter.PermanentAddress
Next
Wscript.Echo ""
Next
Thanks
M.
This is for the Intel(R) PRO/1000 MT Dual Port Server Adapter
strComputerName = "."
Set objIntelWMIService = GetObject( "winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputerName & "\root\IntelNCS2" )
Set colAdapterTeams = objIntelWMIService.ExecQuery( "SELECT * FROM IANet_TeamOfAdapters" )
For Each objAdapterTeam In colAdapterTeams
Wscript.Echo "AdapterCount = " & objAdapterTeam.AdapterCount
Wscript.Echo "MaxAdapterCount = " & objAdapterTeam.MaxAdapterCount
Wscript.Echo "MFOEnabled = " & objAdapterTeam.MFOEnabled
Wscript.Echo "TeamingMode = " & objAdapterTeam.TeamingMode
Wscript.Echo "Caption = " & objAdapterTeam.Caption
Wscript.Echo "CreationClassName = " & objAdapterTeam.CreationClassName
Wscript.Echo "Name = " & objAdapterTeam.Name
Wscript.Echo ""
Set colLogicalAdapters = objIntelWMIService.ExecQuery( "ASSOCIATORS OF " & _
"{IANet_TeamOfAdapters.Name=""" & objAdapterTeam.Name & """} " & _
"WHERE AssocClass = IANet_NetworkVirtualAdapter" )
For Each objLogicalAdapter in colLogicalAdapters
Wscript.Echo "OriginalDisplayName = " & objLogicalAdapter.OriginalDisplayName
Wscript.Echo "Per address = " & objLogicalAdapter.PermanentAddress
Next
Wscript.Echo ""
Next
Thanks
M.