(imported topic written by Steve91)
Hi Guys
Not sure this is totally possible, I’m trying to query some HBA’s and return amongst other info the Node WWN and Port WWN
Node WWN is fine with the below query:
q: (integer values of selects “NodeWWN from MSFC_FCAdapterHBAAttributes” of wmi “root\wmi” as hexadecimal)
A: 20
A: 0
A: 0
A: e0
A: 8b
A: 82
A: a0
A: 86
A: 20
A: 0
A: 0
A: e0
A: 8b
A: 81
A: 6d
A: 8b
A: 20
A: 0
A: 0
A: e0
A: 8b
A: 82
A: a3
The problem I have is with the PortWWN. VBScript example below:
’ (VBScript)
Set enumSetAdapters = oWbemServices.InstancesOf(“MSFC_FCAdapterHBAAttributes”)
Set enumSetPorts = oWbemServices.InstancesOf(“MSFC_FibrePortHBAAttributes”)
nIndex = 0
For Each oEltAdapter in enumSetAdapters
For Each oEltPort in enumSetPorts
If (oEltAdapter.InstanceName = oEltPort.InstanceName) Then
sAdapterName = oEltAdapter.MfgDomain & _
“-” & oEltAdapter.Model & “-” & nIndex
WScript.Echo " adapter: " & sAdapterName
WScript.Echo " node_wwn: " & WWNToString(oEltAdapter.NodeWWN)
WScript.Echo " port_wwn: " & _
WWNToString(oEltPort.Attributes.PortWWN)
WScript.Echo
nIndex = nIndex + 1
End If
Next ’ oEltPort
Next ’ oEltAdapter
Note that this script gets the PortWWN property, but not directly from an instance of MSFC_FibrePortHBAAttributes. Instead, it must get PortWWN from an embedded Attributes property, which references an instance of the MSFC_HBAPortAttributesResults class.
Is this possible with a WMI query in BigFix?
Cheers