Intel AMT Features > Remote Access > Use Cases > Remove a Management Presence Server
CollapseAll image

Remove a Management Presence Server

The following steps describe how to remove an MPS.

1.  Invoke AMT_ManagementPresenceRemoteSAP.Delete using the EPR returned when the MPS instance was created (see Add a Management Presence Server), or by using the following parameters:

Parameter

Value

SystemCreationClassName

“CIM_ComputerSystem”

SystemName

“Intel(R) AMT”

CreationClassName

“AMT_ManagementPresenceRemoteSAP”

Name

“AMT:Management Presence Server” [handle]

Where [handle] is the number of the MPS, returned when adding the instance.

 

 Note:

First remove any policy associated with the MPS (see Remove a Remote Access Policy). If the MPS is associated with a policy it will not be deleted, and the return code will be “not permitted”.

Click here for a snippet demonstrating this step

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

  

# $mpServerRef is an EPR to the AMT_ManagementPresenceRemoteSAP object created by the 'Add a Management Presence Server' use case.

$mpServerRef.Delete()

 

 

2.  If the MPS could not be removed because it is associated with a policy, perform the following:

a.  Enumerate the AMT_RemoteAccessPolicyAppliesToMPS association.

b.  Examine the ManagedElement property, looking for a match with the Name property in the AMT_ManagementPresenceRemoteSAP instance defining the MPS.

c.  For each matching instance, examine the PolicySet property to find the EPR of the policy to delete. Perform AMT_RemoteAccessPolicyRule.Delete to delete policy.

d.  Repeat step 1 to delete the MPS.

 

Click here for a snippet demonstrating this step

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

  

$remoteAccessPolicyAppliesToMPSRef = $wsmanConnectionObject.NewReference("AMT_RemoteAccessPolicyAppliesToMPS")

# $mpServer is an EPR to the AMT_ManagementPresenceRemoteSAP object created by the 'Add a Management Presence Server' use case.

$remoteAccessPolicyAppliesToMPSRef.AddSelector("ManagedElement",$mpServerRef)

# Traverse to the AMT_RemoteAccessPolicyAppliesToMPS instances that are connected to the $mpServer.

foreach($remoteAccessPolicyAppliesToMPSItem in $remoteAccessPolicyAppliesToMPSRef.Enumerate("http://schemas.dmtf.org/wbem/wsman/1/wsman/SelectorFilter", $null))

{

    $remoteAccessPolicyRuleRef = $remoteAccessPolicyAppliesToMPSItem.Object.GetProperty("PolicySet").Ref

    $remoteAccessPolicyRuleRef.Delete()

}

 

 

Instance Diagram

Classes Used in This Flow

SDK Sample

Located at:<SDK_root>\Windows\Intel_AMT\Samples\WS-Management\RemoteAccessAdmin

 

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