###############################################################################
#
# Create ManagementActionPointShouldManageEntity in order for the generated
# workflows to run on the correct managment server pool (or gateway)
# If the ResourcePoolName does not contain a value (i.e. Singleton of type ManagementServicePool)
# then we assume the machine will belong to the default 'All Management Servers Resource Pool' and
# we do not the ShouldManage relationship. It will default to the 'All Management Servers Resource Pool'.
#
if($ResourcePoolName -ne $null)
{
$oSource = $discoveryData.CreateClassInstance("$MPElement[Name='SC!Microsoft.SystemCenter.ManagementServiceRuntimePool']$")
$oSource.AddProperty("$MPElement[Name='SC!Microsoft.SystemCenter.ManagementServiceRuntimePool']/Name$", $ResourcePoolName)
$oRel = $discoveryData.CreateRelationshipInstance("$MPElement[Name='SC!Microsoft.SystemCenter.ManagementActionPointShouldManageEntity']$")
$oRel.Source = $oSource
$oRel.Target = $unixInstance
$discoveryData.AddInstance($oRel)
}
$discoveryData </Script></ScriptBody>
<SnapIns/>
<Parameters>$Config/Parameters$</Parameters>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<StrictErrorHandling>$Config/StrictErrorHandling$</StrictErrorHandling>
</DataSource>
</MemberModules>
<Composition>
<Node ID="Script"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.Discovery.Data</OutputType>
</DataSourceModuleType>