Dell.UnsupportedServer.DSMT (DataSourceModuleType)

Element properties:

TypeDataSourceModuleType
IsolationAny
AccessibilityInternal
RunAsDefault
OutputTypeSystem.Discovery.Data

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.TimedScript.DiscoveryProvider Default

Overrideable Parameters:

IDParameterTypeSelector
IntervalSecondsint$Config/IntervalSeconds$

Source Code:

<DataSourceModuleType ID="Dell.UnsupportedServer.DSMT" Accessibility="Internal">
<Configuration>
<xsd:element name="IntervalSeconds" type="xsd:integer"/>
<xsd:element name="Computer" type="xsd:string"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="IntervalSeconds" ParameterType="int" Selector="$Config/IntervalSeconds$"/>
</OverrideableParameters>
<ModuleImplementation>
<Composite>
<MemberModules>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.TimedScript.DiscoveryProvider">
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<SyncTime/>
<ScriptName>DellUnsupportedServerDiscovery.vbs</ScriptName>
<Arguments>$MPElement$ $Target/Id$ $Config/Computer$ </Arguments>
<ScriptBody><Script>

Option Explicit
On Error Resume Next
SetLocale("en-us")
Dim oArgs
Set oArgs = WScript.Arguments
If oArgs.Count &lt; 3 Then
Wscript.Quit -1
End If

Dim sourceId, managedEntityId, targetComputer, model, varModel, modelNumber

sourceId = oArgs(0)
managedEntityId = oArgs(1)
targetComputer = oArgs(2)
model = "$Target/Host/Property[Type="Dell.WindowsServer.Server"]/Model$"
varModel = (LCase(model))
Set modelNumber = New RegExp
With modelNumber
.Pattern = "[0-9][9][0-9][0-9]"
.IgnoreCase = False
.Global = False
End With

Dim oAPI, oDiscoveryData, oInst
Set oAPI = CreateObject("MOM.ScriptAPI")
Set oDiscoveryData = oAPI.CreateDiscoveryData(0, sourceId, managedEntityId)

'checking if model is 9g platform or not
If modelNumber.Test(model) Then
If (InStr(varModel, "poweredge") OR InStr(varModel, "powervault")) Then
set oInst = oDiscoveryData.CreateClassInstance("$MPElement[Name='Dell.Windows.UnsupportedServer']$")
call oInst.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", targetComputer)
call oInst.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.LogicalDevice']/DeviceID$", targetComputer)
call oInst.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "Platform Not Supported")
call oInst.AddProperty("$MPElement[Name='Dell.Windows.UnsupportedServer']/Model$", model)
call oDiscoveryData.AddInstance(oInst)
Else
set oInst = oDiscoveryData.CreateClassInstance("$MPElement[Name='Dell.WindowsServer.Sink']$")
call oInst.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", targetComputer)
call oInst.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "Dell Windows Server")
call oInst.AddProperty("$MPElement[Name='Dell.WindowsServer.Sink']/Name$", targetComputer)
call oDiscoveryData.AddInstance(oInst)
End If
Else
set oInst = oDiscoveryData.CreateClassInstance("$MPElement[Name='Dell.WindowsServer.Sink']$")
call oInst.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", targetComputer)
call oInst.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "Dell Windows Server")
call oInst.AddProperty("$MPElement[Name='Dell.WindowsServer.Sink']/Name$", targetComputer)
call oDiscoveryData.AddInstance(oInst)
End If

' Submit the data
Call oAPI.Return(oDiscoveryData)
Set oDiscoveryData = Nothing
Set oAPI = Nothing
</Script></ScriptBody>
<TimeoutSeconds>300</TimeoutSeconds>
</DataSource>
</MemberModules>
<Composition>
<Node ID="DS"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.Discovery.Data</OutputType>
</DataSourceModuleType>