Lenovo.TMM.Server.ServerInfo.Monitor.Property.Bag.Probe (ProbeActionModuleType)

Element properties:

TypeProbeActionModuleType
IsolationAny
AccessibilityInternal
RunAsDefault
InputTypeSystem.BaseData
OutputTypeSystem.PropertyBagData

Member Modules:

ID Module Type TypeId RunAs 
ServerInfo.ProbeAction ProbeAction Microsoft.Windows.PowerShellPropertyBagProbe Default

Source Code:

<ProbeActionModuleType ID="Lenovo.TMM.Server.ServerInfo.Monitor.Property.Bag.Probe" Accessibility="Internal">
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="ComputerName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="HostOSVersion" type="xsd:string"/>
</Configuration>
<ModuleImplementation>
<Composite>
<MemberModules>
<ProbeAction ID="ServerInfo.ProbeAction" TypeID="Windows!Microsoft.Windows.PowerShellPropertyBagProbe">
<ScriptName>PSUServerInfo.ps1</ScriptName>
<ScriptBody><Script>

# **********************************************************************************
# Script Name : PSUServerInfo
# Authored by : MphasiS Corporation
# Description : ProbeAction for ServerInformation
#
# Copyright (c) 2013 Lenovo Group. All rights reserved.
# Redistribution and use in source and binary forms, with or without modification,
# is not permitted without specific prior written permission from Lenovo.
# **********************************************************************************

param($computerName, $HostOSVersion)

$api = new-object -comObject 'MOM.ScriptAPI'
$bag = $api.CreatePropertyBag()

$bag.AddValue('ComputerName',$computerName)
$bag.AddValue('HostOSVersion',$HostOSVersion)

if ( $HostOSVersion -ne $null )
{
$bag.AddValue('Status', 'OK')
}
elseif ( $HostOSVersion -eq $null)
{
$bag.AddValue('Status', 'Bad')
}

#Return the property bag
$bag



</Script></ScriptBody>
<Parameters>
<Parameter>
<Name>ComputerName</Name>
<Value>$Config/ComputerName$</Value>
</Parameter>
<Parameter>
<Name>HostOSVersion</Name>
<Value>$Config/HostOSVersion$</Value>
</Parameter>
</Parameters>
<TimeoutSeconds>300</TimeoutSeconds>
</ProbeAction>
</MemberModules>
<Composition>
<Node ID="ServerInfo.ProbeAction"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.PropertyBagData</OutputType>
<InputType>System!System.BaseData</InputType>
</ProbeActionModuleType>