<WriteActionModuleType ID="Microsoft.JEE.Enable.Apm.WriteActionModuleType" Accessibility="Internal" Batching="false">
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="EntityId" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TargetInstanceId" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TaskTimeoutSeconds" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Enable" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ClassId" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="GroupClassId" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ApplicationServerInstanceId" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ApplicationServerHostName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ApplicationName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ApplicationType" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ApplicationObjectName" type="xsd:string"/>
</Configuration>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<ProbeAction ID="CreateData" TypeID="Windows!Microsoft.Windows.PowerShellDiscoveryProbe">
<ScriptName>SetGroupMembership.ps1</ScriptName>
<ScriptBody><Script>##########################################################################################
# <copyright file="Relationship.ps1" company="Microsoft">
# Copyright (c) Microsoft Corporation. All rights reserved.
# </copyright>
# <summary>Script to create the relationship instance between an APM application and the
# group against which rules and monitors will run.
# </summary>
##########################################################################################
#
# The Enable parameter is used to control whether the relationship is created or destroyed
#
param($EntityId, $TargetInstanceId, $Enable, $classid, $grpClassid, $appServerInstanceId, $appServerHostName, $appName, $appType, $appObjectName)
$api = New-Object -comObject 'Mom.ScriptAPI'