8 lines
608 B
PowerShell

# Select the wired interface.
$ethernetPortRef = $wsmanConnectionObject.NewReference("SELECT * FROM CIM_EthernetPort WHERE DeviceID='Intel(r) AMT Ethernet Port 0'")
# $systemDefensePolicyRef is an EPR to the AMT_SystemDefensePolicy object created by the 'Create System Defense Policy' use case.
$inputObject = $systemDefensePolicyRef.CreateMethodInput("UpdateStatistics")
$inputObject.SetProperty("NetworkInterface", $ethernetPortRef)
$inputObject.SetProperty("ResetOnRead", "true")
$outputObject = $systemDefensePolicyRef.InvokeMethod($inputObject)
$returnValue = $outputObject.GetProperty("ReturnValue")