serverRoom/amt-sdk-20-0-0-1/IntelvProModule/PS_Snippets/AgentPresence/Set an Agent Watchdogs System Defense Policy.ps1

8 lines
761 B
PowerShell

$instanceID = # The ID of the System Defense policy you want to enable.
$systemDefensePolicyRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_SystemDefensePolicy WHERE InstanceID='" + $instanceID + "'")
# Get a reference to the wired ethernet port.
$ethernetPortRef = $wsmanConnectionObject.NewReference("SELECT * FROM CIM_EthernetPort WHERE DeviceID='Intel(r) AMT Ethernet Port 0'")
$agentPresenceInterfacePolicyInstance = $wsmanConnectionObject.NewInstance("AMT_AgentPresenceInterfacePolicy")
$agentPresenceInterfacePolicyInstance.SetProperty("Antecedent", $ethernetPortRef)
$agentPresenceInterfacePolicyInstance.SetProperty("Dependent", $systemDefensePolicyRef)
$agentPresenceInterfacePolicyRef = $agentPresenceInterfacePolicyInstance.Create()