Intel AMT Features > Event Manager > Use Cases > Delete an Event Filter Subscriber
CollapseAll image

Delete an Event Filter Subscriber

The following steps describe how to delete an event filter subscriber.

1.  Retrieve the instance of AMT_SNMPEventSubscriber you want to delete, using the “PolicyID” and “InfoFormat” keys to uniquely identify the instance.

2.  Invoke AMT_SNMPEventSubscriber.Delete.

Click here for a snippet demonstrating this step

You can execute this snippet by inserting it into the execution template found here.

  

$policyID ="0" # The PolicyID you want to delete.

$infoFormat ="3" # Defines the subscriber - identified either as Ipv4 Address (3) or Ipv6 Address (4).

$snmpEventSubscriberRef =$wsmanConnectionObject.NewReference("AMT_SNMPEventSubscriber")

foreach($snmpEventSubscriberItem in$snmpEventSubscriberRef.Enumerate())

{

    $snmpEventSubscriberRef =$snmpEventSubscriberItem.Object.ToReference("Name","CreationClassName")

    $snmpEventSubscriberInstance =$snmpEventSubscriberRef.Get()

    if($snmpEventSubscriberInstance.GetProperty("InfoFormat") -like $infoFormat)

    {

          if($snmpEventSubscriberInstance.GetProperty("PolicyID") -like $policyID)

          {

                $snmpEventSubscriberRef.Delete()

                break

          }

    }    

}

 

 

Instance Diagram

Classes Used in This Flow

SDK Sample

Not applicable

 

See Also:

   Event Filter Subscribers

 

Copyright © 2006-2022, Intel Corporation. All rights reserved.