Server Management - Systems Insight Manager
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting MAC Addresses for all interfaces

Jonathan Hylton
Occasional Contributor

Getting MAC Addresses for all interfaces

HI there,

I am trying to get the MAC Addresses via a script or report from servers that are already in SIM. My problem is I only get the MAC of NIC1 from reporting from SIM since the cards have been teamed.

Is there a way I can pull this via a script? even if use "GETMAC" it will only display NIC1 MAC address. Also I would really like to be able to get the MAC Address of the ILO Card as well.

any help would be greatly appreciated.

Thx

Jonathan
6 REPLIES
David Kennedy_6
Frequent Advisor

Re: Getting MAC Addresses for all interfaces

Jonathan,
Did you ever find a solution for this?

Cheers
David
Keith Wong
Occasional Visitor

Re: Getting MAC Addresses for all interfaces

Jonathan, do you have any solution yet? If so, wouldn't you mind to share with us?
Robert Berrie_2
Occasional Contributor

Re: Getting MAC Addresses for all interfaces

Could you not do something like this:

strMachineName="."

Set objWMIService = GetObject("winmgmts:{(Security)}\\" & strMachineName & "\root\cimv2")
Set objNetworkAdapters = objWMIService.ExecQuery("select * from Win32_NetworkAdapterConfiguration" ) ' where IPEnabled = 1")
If err.number = 0 Then
For Each objAdapter In objNetworkAdapters
If isarray(objAdapter.IPAddress) Then
For iLoop = 0 To ubound(objAdapter.IPAddress)
strIPAddress= objAdapter.IPAddress(iloop) & "," & strIPAddress
Next
strIPAddress= left(strIPAddress, len(strIPAddress)-1)
Else
strIPAddress= objAdapter.IPAddress
End If
If strIPAddress= "" Then
strIPAddress= (none)
End If
strMACAddress = objAdapter.MacAddress
If strMACAddress <> "" Then
wscript.echo objAdapter.Caption & "," & strMACAddress
End If
Next
Else
If err.number = 424 Then
strStatus = "WMI not available"
Else
strStatus = err.Number & " - " & err.Description
End if
wscript.echo strstatus & "," & strMACAddress
End If
MarkButler
Occasional Advisor

Re: Getting MAC Addresses for all interfaces

Is that a cmd file?
Steve Neruda
Occasional Visitor

Re: Getting MAC Addresses for all interfaces

No, this is a visual basic script. You can save it as "filename.vbs" and run it at the command prompt with "cscript filename.vbs".

Unfortunately it will not get the "burned-in" mac address once it is teamed.
Darrin Rawls
Respected Contributor

Re: Getting MAC Addresses for all interfaces

HP SIM has a full command line interface. Check out the help or the Technical Reference Guide off the web (i.e. the Help file in printable format). The command is mxreport....