Supermicro.SSM.PA.UpdateBIOS (ProbeActionModuleType)

Element properties:

TypeProbeActionModuleType
IsolationAny
AccessibilityPublic
RunAsDefault
InputTypeSystem.BaseData
OutputTypeSystem.PropertyBagData

Member Modules:

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

Overrideable Parameters:

IDParameterTypeSelector
Filenamestring$Config/Filename$

Source Code:

<ProbeActionModuleType ID="Supermicro.SSM.PA.UpdateBIOS" Accessibility="Public">
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="IP" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HostOID" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Filename" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeoutSeconds" type="xsd:int"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="Filename" Selector="$Config/Filename$" ParameterType="string"/>
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<ProbeAction ID="PA" TypeID="Windows!Microsoft.Windows.PowerShellPropertyBagProbe">
<ScriptName>UpdateBIOS.ps1</ScriptName>
<ScriptBody><Script>param($IP,$HostOID,$Filename)
$mod = (New-Object -ComObject WScript.Shell).RegRead('HKLM\SOFTWARE\Supermicro\SCOM_Management_Plugin\Install_Dir')+'\Supermicro.BIN.PSLibrary.dll'
Import-Module $mod


$api = New-Object -comObject 'MOM.ScriptAPI'
$propertyBagData = $api.CreatePropertyBag()

$propertyBagData.AddValue("IP", $IP)
$propertyBagData.AddValue("HostOID", $HostOID)
$propertyBagData.AddValue("Filename", $Filename)

$result = Get-UpdateBIOSImg $IP $HostOID $Filename
$result.response = [System.Text.RegularExpressions.Regex]::Replace($result.response, "\s{1,}", " ")
$propertyBagData.AddValue("Status", $result.status)
$propertyBagData.AddValue("Result", $result.response)
$propertyBagData
</Script></ScriptBody>
<Parameters>
<Parameter>
<Name>IP</Name>
<Value>$Config/IP$</Value>
</Parameter>
<Parameter>
<Name>HostOID</Name>
<Value>$Config/HostOID$</Value>
</Parameter>
<Parameter>
<Name>Filename</Name>
<Value>$Config/Filename$</Value>
</Parameter>
</Parameters>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
</ProbeAction>
</MemberModules>
<Composition>
<Node ID="PA"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.PropertyBagData</OutputType>
<InputType>System!System.BaseData</InputType>
</ProbeActionModuleType>