![]() |
The following steps describe how to delete a specific filter.
1. Enumerate the instances of AMT_SystemDefensePolicy.
2. Examine the items returned by the enumerate method and search for the relevant value of the desired property. For example, to delete all policies with the name “MyPolicy”, search for the “MyPolicy” value in the property PolicyName.
3. Invoke the Delete method on the instance.
|
Filters that were attached to this policy can now be deleted. |
Click here for a snippet demonstrating this step
You can execute this snippet by inserting it into the execution template found here.
# The relevant value of the property that was used to discover the desired policy.
$policyName ="MyPolicy"
$systemDefensePolicyRef =$wsmanConnectionObject.NewReference("AMT_SystemDefensePolicy")
foreach($systemDefensePolicyItem in$systemDefensePolicyRef.Enumerate())
{
$systemDefensePolicyRef =$systemDefensePolicyItem.Object.ToReference("InstanceID")
$systemDefensePolicyInstance =$systemDefensePolicyRef.Get()
if($systemDefensePolicyInstance.GetProperty("PolicyName") -like $policyName)
{
$systemDefensePolicyRef.Delete()
}
}
Additional Information
The AMT_SystemDefensePolicy.Delete method deletes all instances of AMT_FilterInSystemDefensePolicy associated to the policy, and the AMT_NetworkFilters that were created using the AMT_SystemDefensePolicy.Create method. In addition, if the policy statistics were updated (see Update Policy Statistics) after the creation of the policy, all the instances of AMT_ActiveFilterStatsitics that were created are also deleted.
Instance Diagram
Not applicable
Classes Used in This Flow
SDK Sample
If there is a sample demonstrating this flow, it is included in the SDK installation file. See SDK Installation Layout for details.
See Also: |
Copyright © 2006-2022, Intel Corporation. All rights reserved. |