9 lines
724 B
PowerShell
9 lines
724 B
PowerShell
$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()
|
|
} |