Dell Chassis Management Controller Discovery

Dell.CMC.Discovery.DSMT (DataSourceModuleType)

The discovery module for Dell Chassis Management Controller (CMC).

Element properties:

TypeDataSourceModuleType
IsolationAny
AccessibilityPublic
RunAsDefault
OutputTypeSystem.Discovery.Data

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource System.Discovery.Scheduler Default
P1 ProbeAction System.SnmpProbe Default
P2 ProbeAction Microsoft.Windows.ScriptDiscoveryProbe Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
Intervalint$Config/Interval$IntervalInterval in seconds
LogLevelint$Config/LogLevel$Log LevelLog level

Source Code:

<DataSourceModuleType ID="Dell.CMC.Discovery.DSMT" Accessibility="Public" Batching="false">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>System!System.Discovery.MapperSchema</SchemaType>
<SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element minOccurs="1" name="IPAddress" type="xsd:string"/>
<xsd:element minOccurs="1" name="DeviceKey" type="xsd:string"/>
<xsd:element minOccurs="1" name="CommunityString" type="xsd:string"/>
<xsd:element minOccurs="1" name="Version" type="xsd:string"/>
<xsd:element minOccurs="1" name="Interval" type="xsd:integer"/>
<xsd:element minOccurs="1" name="LogLevel" type="xsd:integer"/>
<xsd:element minOccurs="1" name="PortNumber" type="xsd:integer"/>
<xsd:element name="SnmpVarBinds">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="1" maxOccurs="unbounded" name="SnmpVarBind">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="OID" type="xsd:string"/>
<xsd:element name="Syntax" type="xsd:integer"/>
<xsd:element name="Value">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="VariantType" type="xsd:integer" use="optional"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="Interval" Selector="$Config/Interval$" ParameterType="int"/>
<OverrideableParameter ID="LogLevel" Selector="$Config/LogLevel$" ParameterType="int"/>
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<DataSource ID="DS" TypeID="System!System.Discovery.Scheduler">
<Scheduler>
<SimpleReccuringSchedule>
<Interval Unit="Seconds">$Config/Interval$</Interval>
</SimpleReccuringSchedule>
<ExcludeDates/>
</Scheduler>
</DataSource>
<ProbeAction ID="P1" TypeID="Snmp!System.SnmpProbe">
<IsWriteAction>false</IsWriteAction>
<IP>$Config/IPAddress$</IP>
<CommunityString>$Config/CommunityString$</CommunityString>
<!--to discover snmp v1 devices-->
<!--<Version>$Config/Version$</Version>-->
<SnmpVarBinds>$Config/SnmpVarBinds$</SnmpVarBinds>
</ProbeAction>
<ProbeAction ID="P2" TypeID="Windows!Microsoft.Windows.ScriptDiscoveryProbe">
<ScriptName>DellCMCDiscovery.vbs</ScriptName>
<Arguments>IPAddress #*# $Config/IPAddress$ #*# CommunityString #*# $Config/CommunityString$ #*# SourceId #*# $MPElement$ #*# ManagedEntityId #*# $Target/Id$ #*# Loglevel #*# $Config/LogLevel$ #*# SNMPErrorCode #*# $Data/ErrorCode$ #*# DeviceKey #*# $Config/DeviceKey$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[1]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[1]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[2]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[2]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[3]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[3]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[4]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[4]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[5]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[5]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[6]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[6]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[7]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[7]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[8]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[8]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[9]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[9]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[10]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[10]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[11]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[11]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[12]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[12]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[13]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[13]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[14]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[14]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[15]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[15]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[16]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[16]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[17]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[17]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[18]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[18]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[19]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[19]/Value$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[20]/OID$ #*# $Data[Default='']/SnmpVarBinds/SnmpVarBind[20]/Value$ ###</Arguments>
<ScriptBody><Script>
'**********************************************************************************
' Script Name - DellCMCDiscovery
' Author: Rashma, Thomas 20120213
'
' Description:
' Discovers all Dell CMC.
'
' (c) Copyright Dell Inc. 2011-2014. All rights reserved
'**********************************************************************************
Option Explicit
On Error Resume Next
SetLocale("en-us")

Dim IPAddress, CommunityString, Version, Timeout, Interval, LogLevel
Dim ProdName, Short_Product_Name, Description, Manufacturer, Chassis_Tag
Dim OOB_URL, Chassis_Name, Service_Tag, Product_Type, Firmware_Version, CMC_Version, UID
Dim SNMPSuccess, strErrorCode, logMessage, DeviceKey, AssetTag
Dim oAPI, oDiscoveryData, oInstance, oInstance1, oInstance2, oRelationship
Dim SourceId, ManagedEntityId,ChassisType
Dim Classifier, regHostName
Dim AttrMap, ValueMap
Dim oArgs
Dim fileSize, strOutFile, objLogFSO, objLogTextFile, strFileName

Set oArgs = WScript.Arguments

InitLookups()
GetArguments()
InitLogging()

MOMDebugLog 1,"Display the Content in HashMaps for Debugging."
MOMDebugLog 1,"--------------------Attribute MAP------------------"
DisplayMap(AttrMap)
MOMDebugLog 1,"--------------------Value Map-----------------------"
DisplayMap(ValueMap)

'Classify if the received IP is a CMC or a DRAC/MC
Classifier = ChassisClassifer()
MOMDebugLog 1, "Received IP is a " &amp; Classifier

MOMDebugLog 1, "Creating oDiscoveryData(" &amp; ValueMap.Item("SourceId") &amp; "," &amp; ValueMap.Item("ManagedEntityId") &amp; ")"
Set oAPI = CreateObject("MOM.ScriptAPI")
Set oDiscoveryData = oAPI.CreateDiscoveryData(0,ValueMap.Item("SourceId"),ValueMap.Item("ManagedEntityId"))

' Filter IP that is not CMC or DRAC/MC
If StrComp(Classifier, "Dell.ModularChassis.CMC") = 0 OR StrComp(Classifier, "Dell.ModularChassis.DRACMC") = 0 OR StrComp(Classifier, "Dell.ModularChassis.M1000E") = 0 OR StrComp(Classifier, "Dell.ModularChassis.VRTX") = 0 OR StrComp(Classifier, "Dell.ModularChassis.FX2") = 0 Then
Else
MOMDebugLog 1, "It is not a CMC or DRAC/MC."
EmptyDiscovery()
Wscript.Quit(0)

End If

'Do not discover empty ServiceTag/ChassisTag, Coz we can not have empty Key
Dim rmEmptyUID
rmEmptyUID = ValueMap.Item("Chassis_Tag")
If (StrComp(rmEmptyUID, "") = 0) OR (StrComp(rmEmptyUID, "Not Available") = 0) Then
MOMDebugLog 1, "UID Can not be null. Hence, can not discover:" &amp; ValueMap.Item("IPAddress")
EmptyDiscovery()
Wscript.Quit(0)
End If

MOMDebugLog 1, "Getting Health Service hosted"
'Get Principal Name
regHostName = GetRegistryValue("HKEY_LOCAL_MACHINE\Software\Dell Computer Corporation\Dell Management Pack Suites\MSHostname")

If StrComp(Classifier, "Dell.ModularChassis.FX2") = 0 OR StrComp(Classifier, "Dell.ModularChassis.VRTX") = 0 OR StrComp(Classifier, "Dell.ModularChassis.M1000E") = 0 OR StrComp(Classifier, "Dell.ModularChassis.CMC") = 0 Then
CreateCMCHierarchy(Classifier)
Elseif StrComp(Classifier, "Dell.ModularChassis.DRACMC") = 0 Then
CreateDRACMCHierarchy()
Else
EmptyDiscovery()
Wscript.Quit(0)
End If

Call oAPI.Return(oDiscoveryData)
Set oDiscoveryData = Nothing
Set oAPI = Nothing
logMessage = "INFO : Script - DellCMCDiscovery : End()"
MOMDebugLog 1, logMessage
MOMDebugLog 1,"--------------------------------------------------"

'##############################################
'Classify the network devices and the classifier name is the class name
Function ChassisClassifer
If StrComp(ValueMap.Item("Product_Type"), "8") = 0 Then
ChassisClassifer = "Dell.ModularChassis.M1000E"
elseif StrComp(ValueMap.Item("Product_Type"), "18") = 0 Then
ChassisClassifer = "Dell.ModularChassis.VRTX"
elseif StrComp(ValueMap.Item("Product_Type"), "19") = 0 Then
ChassisClassifer = "Dell.ModularChassis.FX2"
elseif (StrComp(ValueMap.Item("Short_Product_Name"), "DRAC/MC") = 0 ) And (InStr(ValueMap.Item("System_OID"), "1.3.6.1.4.1.674.10892.2") &gt; 0 ) Then
ChassisClassifer = "Dell.ModularChassis.DRACMC"
else
ChassisClassifer = "Unknown"
end if
End Function
'##################################################
Function GetMSName
Dim StrRegKeyCompName, StrRegKeyTCPIP, WSHShell, StrHostname, StrDomainName, StrFQDN
StrRegKeyCompName = "HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\"
StrRegKeyTCPIP = "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\"

Set WSHShell = CreateObject("WScript.Shell")

StrHostname = WSHShell.RegRead (StrRegKeyTCPIP &amp; "Hostname")
StrDomainName = WSHShell.RegRead (StrRegKeyTCPIP &amp; "Domain")
StrFQDN = StrHostName &amp; "." &amp; StrDomainName
GetMSName = StrFQDN
End Function
'##################################################
Function GetRegistryValue (strRegistryKey )
Dim WSHShell, value
On Error Resume Next
Set WSHShell = CreateObject("WScript.Shell")
value = WSHShell.RegRead( strRegistryKey )
If(strcomp(value,"") = 0) Then
value = GetMSName()
end if
set WSHShell = nothing
GetRegistryValue = value
End Function
'##################################################
Function PopulateAttrMap()

AttrMap.Add "SourceId", "SourceId"
AttrMap.Add "ManagedEntityId", "ManagedEntityId"
AttrMap.Add "Loglevel", "Loglevel"
AttrMap.Add "IPAddress", "IPAddress"
AttrMap.Add "UID", "UID"
AttrMap.Add "DeviceKey", "DeviceKey"
AttrMap.Add "SNMPErrorCode", "SNMPErrorCode"
AttrMap.Add "CommunityString", "CommunityString"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.1.0", "ProdName"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.2.0", "Short_Product_Name"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.3.0", "Description"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.4.0", "Manufacturer"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.5.0", "CMC_Version"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.6.0", "Chassis_Tag"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.7.0", "OOB_URL"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.8.0", "AssetTag"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.10.0", "Chassis_Name"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.11.0", "Service_Tag"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.14.0", "Product_Type"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.2.1.0", "Firmware_Version"
AttrMap.Add ".1.3.6.1.2.1.1.2.0", "System_OID"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.19.0", "SystemModel"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.15.0", "DataCenterName"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.20.0", "ExpressServiceCode"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.2.2.0", "iKVMFirmwareVersion"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.16.0", "Aisle"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.17.0", "Rack"
AttrMap.Add ".1.3.6.1.4.1.674.10892.2.1.1.18.0", "SlotOnRack"
End Function
'##############################################
Function GetArguments()
MOMDebugLog 1, "Entered GetArguments"
Dim ArgumentIterator, ArgumentCounter, ArgumentBuffer , ArgumentTemp
ArgumentIterator = 0
ArgumentCounter = 0
ArgumentBuffer = "Not Available"
Dim key, value

Do
ArgumentTemp = oArgs(ArgumentIterator)
if ((StrComp(ArgumentTemp,"#*#") = 0 ) or (StrComp(argumentTemp,"###") = 0 )) Then
if ((ArgumentCounter mod 2) = 0) Then
key = trim(ArgumentBuffer)
else
value = trim(ArgumentBuffer)
AddToValueMap key, value
end if
ArgumentBuffer = ""
ArgumentCounter = ArgumentCounter + 1
elseif (StrComp(ArgumentBuffer,"Not Available") = 0 ) Then
ArgumentBuffer = ArgumentTemp
else
ArgumentBuffer = ArgumentBuffer &amp; " " &amp; ArgumentTemp
end if
ArgumentIterator = ArgumentIterator + 1
Loop while Not(StrComp(argumentTemp,"###") = 0)
PopulateValueMap(AttrMap)

End Function
'##################################
Function InitLookups
Set AttrMap = CreateObject("Scripting.Dictionary")
PopulateAttrMap()
Set ValueMap = CreateObject("Scripting.Dictionary")
End Function
'###########################################
Function AddToValueMap(key, value)
Dim attrName
if(StrComp(Left(key, 3), "1.3") = 0 )Then
key = "." &amp; key
End if
if AttrMap.Exists(key) Then
attrName = AttrMap.Item(key)
if StrComp(value, "") = 0 Then
value = "Not Available"
end if
if ValueMap.Exists(attrName) Then
ValueMap.Item(attrName) = value
else
ValueMap.Add attrName, value
end if
else
attrName = AttrMap.Item(key)
end If

End Function
'#####################################################
Function DisplayMap(ByRef map)
Dim i, cnt
cnt = 1
For each i in map.Keys
MOMDebugLog 1, cnt &amp; ": Key: " &amp; i &amp; ", Value:" &amp; map.Item(i)
cnt = cnt + 1
Next

End Function
'#####################################################
Function PopulateValueMap(ByRef map)
Dim value, cnt, key1
cnt = 0
value = "Not Available"

For each key1 in map.Items
If(ValueMap.Exists(key1) = false) Then
ValueMap.Add key1, value
End If
Next
End Function
'##############################################################
Function CreateCMCHierarchy(sClassifier)
Dim Location
logMessage = "INFO: Script - DellCMCDiscovery : CreateCMCHierarchy() - Start"
MOMDebugLog 1, logMessage
'create Dell.ModularChassis.CMC
logMessage = "INFO: Script - DellCMC Discovery : creating " + sClassifier + " Device"
MOMDebugLog 1, logMessage
Location = "AISLE:" &amp; ValueMap.Item("Aisle") &amp; ", RACK:" &amp; ValueMap.Item("Rack") &amp; ", Slot on Rack:" &amp; ValueMap.Item("SlotOnRack")

If StrComp(sClassifier, "Dell.ModularChassis.M1000E") = 0 Then
Set oInstance1 = oDiscoveryData.CreateClassInstance("$MPElement[Name='DAD!Dell.ModularChassis.M1000E']$")
ElseIf StrComp(sClassifier, "Dell.ModularChassis.VRTX") = 0 Then
Set oInstance1 = oDiscoveryData.CreateClassInstance("$MPElement[Name='DAD!Dell.ModularChassis.VRTX']$")
ElseIf StrComp(sClassifier, "Dell.ModularChassis.FX2") = 0 Then
Set oInstance1 = oDiscoveryData.CreateClassInstance("$MPElement[Name='DAD!Dell.ModularChassis.FX2']$")
ElseIf StrComp(sClassifier, "Dell.ModularChassis.CMC") = 0 Then
Set oInstance1 = oDiscoveryData.CreateClassInstance("$MPElement[Name='DAD!Dell.ModularChassis.CMC']$")
End If

MOMDebugLog 1, "adding Microsoft.Windows.Computer.PrincipalName: " &amp; regHostName
call oInstance1.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", regHostName)
MOMDebugLog 1, "adding the display name to " &amp; ValueMap.Item("IPAddress")

call oInstance1.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", ValueMap.Item("IPAddress"))
MOMDebugLog 1, "add key:" &amp; ValueMap.Item("Service_Tag")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/ServiceTag$", ValueMap.Item("Service_Tag"))
MOMDebugLog 1, "adding the System Model name to " &amp; ValueMap.Item("SystemModel")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/SystemModel$", ValueMap.Item("SystemModel"))
MOMDebugLog 1, "adding the Data Center Name to " &amp; ValueMap.Item("DataCenterName")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/DataCenterName$", ValueMap.Item("DataCenterName"))
MOMDebugLog 1, "adding the Express Service Code to " &amp; ValueMap.Item("ExpressServiceCode")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/ExpressServiceCode$", ValueMap.Item("ExpressServiceCode"))
MOMDebugLog 1, "adding the Express Service Code to " &amp; ValueMap.Item("iKVMFirmwareVersion")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/iKVMFirmwareVersion$", ValueMap.Item("iKVMFirmwareVersion"))
MOMDebugLog 1, "adding the Aisle value to " &amp; ValueMap.Item("Aisle")
MOMDebugLog 1, "adding the Rack value to " &amp; ValueMap.Item("Rack")
MOMDebugLog 1, "adding the Slot on Rack to " &amp; ValueMap.Item("SlotOnRack")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/Location$", Location)
MOMDebugLog 1, "add ipaddress:" &amp; ValueMap.Item("IPAddress")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/IPAddress$", ValueMap.Item("IPAddress"))
MOMDebugLog 1, "add CommunityString:" &amp; ValueMap.Item("CommunityString")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/CommunityString$", ValueMap.Item("CommunityString"))
MOMDebugLog 1, "add Service_Tag:" &amp; ValueMap.Item("Service_Tag")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/UID$", ValueMap.Item("Service_Tag"))
MOMDebugLog 1, "add DeviceKey:" &amp; ValueMap.Item("IPAddress")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/DeviceKey$", ValueMap.Item("IPAddress"))
MOMDebugLog 1, "add ProdName:"&amp; ValueMap.Item("ProdName")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/ProdName$", ValueMap.Item("ProdName"))
MOMDebugLog 1, "add ShortProductName"&amp; ValueMap.Item("Short_Product_Name")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/ShortProductName$", ValueMap.Item("Short_Product_Name"))
MOMDebugLog 1, "add Description:" &amp; ValueMap.Item("Description")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/Description$", ValueMap.Item("Description"))
MOMDebugLog 1, "add Manufacturer:" &amp; ValueMap.Item("Manufacturer")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/Manufacturer$", ValueMap.Item("Manufacturer"))
MOMDebugLog 1, "add CMC_Version: " &amp; ValueMap.Item("CMC_Version")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/Version$", ValueMap.Item("CMC_Version"))
MOMDebugLog 1, "add ooburl:" &amp; ValueMap.Item("OOB_URL")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/OOBURL$", ValueMap.Item("OOB_URL"))
MOMDebugLog 1, "add name:" &amp; ValueMap.Item("Chassis_Name")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/ChassisName$", ValueMap.Item("Chassis_Name"))
MOMDebugLog 1, "add firmware:" &amp; ValueMap.Item("Firmware_Version")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/Firmware$", ValueMap.Item("Firmware_Version"))
MOMDebugLog 1, "add AssetTag:" &amp; ValueMap.Item("AssetTag")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.CMC']/AssetTag$", ValueMap.Item("AssetTag"))
Set oInstance2 = oDiscoveryData.CreateClassInstance("$MPElement[Name='Dell.CMC.NetworkDevice']$")
call oInstance2.AddProperty("$MPElement[Name='NetworkDevice!Microsoft.SystemCenter.NetworkDevice']/IPAddress$", ValueMap.Item("IPAddress"))
oDiscoveryData.AddInstance oInstance1
oDiscoveryData.AddInstance oInstance2

Set oRelationship = oDiscoveryData.CreateRelationshipInstance("$MPElement[Name='DellModularChassisCMC.Contains.DellCMCNetworkDevice']$")
oRelationship.Source = oInstance1
oRelationship.Target = oInstance2
oDiscoveryData.AddInstance oRelationship

logMessage = "INFO: Exiting CreateCMCHierarchy() "
MOMDebugLog 1, logMessage

End Function
'##################################################
Function CreateDRACMCHierarchy()

logMessage = "INFO: Script - DellCMCDiscovery : CreateDRACMCHierarchy() - Start"
MOMDebugLog 1, logMessage
'create DRAC/MC Device
logMessage = "INFO: Script - DellCMC Discovery : creating DRACMC Device"
MOMDebugLog 1, logMessage

Set oInstance1 = oDiscoveryData.CreateClassInstance("$MPElement[Name='DAD!Dell.ModularChassis.DRACMC']$")
MOMDebugLog 1, "adding Microsoft.Windows.Computer.PrincipalName : " &amp; regHostName
call oInstance1.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", regHostName)
MOMDebugLog 1, "adding the display name to System!System.Entity"
call oInstance1.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", ValueMap.Item("IPAddress"))
'power status - 1.servicetag 2. UID=ip(OM07)/mac(OM12)
MOMDebugLog 1, "add key:" &amp; ValueMap.Item("Service_Tag")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.DRACMC']/ServiceTag$", ValueMap.Item("Chassis_Tag"))
MOMDebugLog 1, "add ipaddress:" &amp; ValueMap.Item("IPAddress")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.DRACMC']/IPAddress$", ValueMap.Item("IPAddress"))
MOMDebugLog 1, "add CommunityString:" &amp; ValueMap.Item("CommunityString")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.DRACMC']/CommunityString$", ValueMap.Item("CommunityString"))
MOMDebugLog 1, "add UID:" &amp; ValueMap.Item("Chassis_Tag")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.DRACMC']/UID$", ValueMap.Item("Chassis_Tag"))
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.DRACMC']/DeviceKey$", ValueMap.Item("IPAddress"))
MOMDebugLog 1, "add ProdName:"&amp; ValueMap.Item("ProdName")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.DRACMC']/ProdName$", ValueMap.Item("ProdName"))
MOMDebugLog 1, "add short prod name:"&amp; ValueMap.Item("Short_Product_Name")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.DRACMC']/ShortProductName$", ValueMap.Item("Short_Product_Name"))
MOMDebugLog 1, "add desc:" &amp; ValueMap.Item("Description")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.DRACMC']/Description$", ValueMap.Item("Description"))
MOMDebugLog 1, "add manu:" &amp; ValueMap.Item("Manufacturer")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.DRACMC']/Manufacturer$", ValueMap.Item("Manufacturer"))
MOMDebugLog 1, "add version: " &amp; ValueMap.Item("CMC_Version")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.DRACMC']/Version$", ValueMap.Item("CMC_Version"))
MOMDebugLog 1, "add ooburl:" &amp; ValueMap.Item("OOB_URL")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.DRACMC']/OOBURL$", ValueMap.Item("OOB_URL"))
MOMDebugLog 1, "add name:" &amp; ValueMap.Item("Chassis_Name")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.DRACMC']/ChassisName$", ValueMap.Item("Chassis_Name"))
MOMDebugLog 1, "add firmware:" &amp; ValueMap.Item("Firmware_Version")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.DRACMC']/Firmware$", ValueMap.Item("Firmware_Version"))
MOMDebugLog 1, "add tag:" &amp; ValueMap.Item("Chassis_Tag")
call oInstance1.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.DRACMC']/AssetTag$", ValueMap.Item("AssetTag"))

Set oInstance2 = oDiscoveryData.CreateClassInstance("$MPElement[Name='Dell.DRACMC.NetworkDevice']$")
call oInstance2.AddProperty("$MPElement[Name='NetworkDevice!Microsoft.SystemCenter.NetworkDevice']/IPAddress$", ValueMap.Item("IPAddress"))
oDiscoveryData.AddInstance oInstance1
oDiscoveryData.AddInstance oInstance2

Set oRelationship = oDiscoveryData.CreateRelationshipInstance("$MPElement[Name='Dell.ModularChassis.DRACMC.Contains.Dell.DRACMC.NetworkDevice']$")
oRelationship.Source = oInstance1
oRelationship.Target = oInstance2
oDiscoveryData.AddInstance oRelationship

logMessage = "INFO: Exiting CreateDRACMCHierarchy() "
MOMDebugLog 1, logMessage
End Function

'##############################################
'Create Sink object and return discovery data
Function EmptyDiscovery()
Set oInstance = oDiscoveryData.CreateClassInstance("$MPElement[Name='DAD!Dell.ModularChassis.Sink']$")
call oInstance.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "Dell Modular Chassis Sink")
call oInstance.AddProperty("$MPElement[Name='DAD!Dell.ModularChassis.Sink']/Name$", "DONTCARE")
oDiscoveryData.AddInstance oInstance
Call oAPI.Return(oDiscoveryData)
Set oDiscoveryData = Nothing
Set oAPI = Nothing
End Function

'##############################################
'Initialize log-file according to log-level
Function InitLogging()

logLevel = CInt(ValueMap.Item("Loglevel"))
'logLevel = 1

' Begin Logheader
If logLevel &lt;&gt; 0 Then
strFileName = "Dell_ChassisRemoteAccess_Discovery_" &amp; ValueMap.Item("IPAddress") &amp; ".log"
Const ForAppending = 8
Const ForWriting = 2
Const MaxFileSize = 524288 'File Size is limited to 512 KB

dim wsShell : Set wsShell = Createobject("WScript.Shell")
dim wshSysEnv : Set wshSysEnv = wsShell.Environment
dim tFolder : tFolder = wshSysEnv("TEMP")
dim wshPrcEnv : Set wshPrcEnv = wsShell.Environment("Process")
tFolder = Replace(tFolder, "%SystemRoot%", wshPrcEnv("SYSTEMROOT"), 1, -1, vbTextCompare)

Set objLogFSO = CreateObject("Scripting.FileSystemObject")
If Not objLogFSO.FolderExists(tFolder) Then
objLogFSO.CreateFolder(tFolder)
End If
tFolder = tFolder &amp; "\ChassisRemoteAccess_Logs"
If Not objLogFSO.FolderExists(tFolder) Then
objLogFSO.CreateFolder(tFolder)
End If
strOutFile = tFolder &amp; "\" &amp; strFileName
If Not objLogFSO.FileExists(strOutFile) Then
Set objLogTextFile = objLogFSO.CreateTextFile(strOutFile)
objLogTextFile.Close()
End If
fileSize = objLogFSO.GetFile(strOutFile).Size
If (fileSize &gt; MaxFileSize) Then
Dim dateStr, datesuffix, timesuffix, subStrLoc, newFilename
dateStr = CDate(Now())
datesuffix = ( Year(dateStr)*100 + Month(dateStr) )*100 + Day(dateStr)
timesuffix = Right((Hour(dateStr)*100+Minute(dateStr))*100+Second(dateStr)+1e7, 6)
subStrLoc = Instr(1, strOutFile,".log")
newFilename = Mid(strOutFile,1,(subStrLoc-1))
newFilename = newFilename &amp;"-"&amp; datesuffix &amp;"-"&amp;timesuffix&amp;".log"
objLogFSO.MoveFile strOutFile, newFilename
Set objLogTextFile = objLogFSO.OpentextFile(strOutFile, ForWriting, True)
Else
Set objLogTextFile = objLogFSO.OpentextFile(strOutFile, ForAppending, True)
End If
logMessage = "INFO: Script - DellCMCDiscovery : Start()"
MOMDebugLog 1, logMessage
Err.Clear
End If
End Function

Sub MOMDebugLog (ByVal debugLevel, ByVal Message)
On Error Resume Next
If (debugLevel &gt; 0) and (debugLevel &lt;= logLevel) Then
objLogTextFile.WriteLine(Now() &amp; "-" &amp; ValueMap.Item("IPAddress") &amp; " ---- " &amp; Message)
Err.Clear
End If
End Sub

</Script></ScriptBody>
<TimeoutSeconds>300</TimeoutSeconds>
</ProbeAction>
</MemberModules>
<Composition>
<Node ID="P2">
<Node ID="P1">
<Node ID="DS"/>
</Node>
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.Discovery.Data</OutputType>
</DataSourceModuleType>