16 lines
1.1 KiB
PowerShell
16 lines
1.1 KiB
PowerShell
# Create a reference to the CIM_EthernetPort instance.
|
|
$ethernetPortRef = $wsmanConnectionObject.NewReference("SELECT * FROM CIM_EthernetPort WHERE DeviceID='Intel(r) AMT Ethernet Port 0'")
|
|
$elementStatisticalDataRef = $wsmanConnectionObject.NewReference("CIM_ElementStatisticalData")
|
|
$elementStatisticalDataRef.AddSelector("ManagedElement", $ethernetPortRef)
|
|
# Traverse to the CIM_ElementStatisticalData instances that are connected to the CIM_EthernetPort instance.
|
|
foreach($elementStatisticalDataItem in $elementStatisticalDataRef.Enumerate("http://schemas.dmtf.org/wbem/wsman/1/wsman/SelectorFilter", $null))
|
|
{
|
|
# For each instance, check if it is associated to the AMT_HeuristicsPacketFilterStatiistics instance.
|
|
if($elementStatisticalDataItem.Object.GetProperty("Stats").IsA("AMT_HeuristicPacketFilterStatistics"))
|
|
{
|
|
# Get the AMT_HeuristicPacketFilterStatistics object using its EPR.
|
|
$heuristicPacketFilterStatisticsRef = $elementStatisticalDataItem.Object.GetProperty("Stats").Ref
|
|
$heuristicPacketFilterStatisticsInstance = $heuristicPacketFilterStatisticsRef.Get()
|
|
break
|
|
}
|
|
} |