SHM Storage Discovery

PowerToolsShm.Shm.Storage.Discovery (Discovery)

Description for the new discovery.

Element properties:

TargetPowerToolsShm.SHMHost
EnabledFalse
Frequency300
RemotableFalse

Member Modules:

ID Module Type TypeId RunAs 
DS.Storage.Discovery DataSource Microsoft.Windows.TimedPowerShell.DiscoveryProvider Default

Source Code:

<Discovery ID="PowerToolsShm.Shm.Storage.Discovery" Target="PowerToolsShm.SHMHost" Enabled="false" ConfirmDelivery="false" Remotable="true" Priority="Normal">
<Category>Discovery</Category>
<DiscoveryTypes/>
<DataSource ID="DS.Storage.Discovery" TypeID="Windows!Microsoft.Windows.TimedPowerShell.DiscoveryProvider">
<!-- IntervalSeconds specifies how often we will run the discovery. -->
<IntervalSeconds>300</IntervalSeconds>
<!-- SyncTime specifies the minutes after the hour to synchronize execution of the discovery. -->
<SyncTime/>
<!-- ScriptName specifies the name of the script. -->
<ScriptName>ShmObjectDiscovery.ps1</ScriptName>
<!-- ScriptBody is the text of the script. In this case, a variable is used to specify the script file in the VSAE project -->
<ScriptBody><Script>param($sourceId,$managedEntityId, $computerName, $restAddress)


$api = new-object -comObject 'MOM.ScriptAPI'
$discoveryData = $api.CreateDiscoveryData(0, $sourceId, $managedEntityId)

$api.LogScriptEvent("SHM New Discovery",9955,2,"Started")</Script></ScriptBody>
<!-- Parameters for the script. -->
<Parameters>
<Parameter>
<Name>sourceID</Name>
<Value>$MPElement$</Value>
</Parameter>
<Parameter>
<Name>managedEntityID</Name>
<Value>$Target/Id$</Value>
</Parameter>
<Parameter>
<Name>computerName</Name>
<Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
</Parameter>
<Parameter>
<Name>restAddress</Name>
<Value>$Target/Property[Type="PowerToolsShm.SHMHost"]/RESTAddress$</Value>
</Parameter>
</Parameters>
<!-- TimeoutSeconds is the seconds that the script must be running before it is automatically ended. -->
<TimeoutSeconds>1200</TimeoutSeconds>
</DataSource>
</Discovery>