Blade Servers running Windows discover duplicate serial numbers

Document ID : KB000050511
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

When discovering Blade servers that are running Windows OS, the Cohesion Hardware Details blueprint will discover the same serial number which creates duplicate values if multiple servers are discovered. Technically, the information being queried is actually the chassis number.

Solution:

The Windows Hardware Detail blueprint uses a script to discover the details of servers running windows.

The script can be found by opening up the blueprint and drilling down under Parameter | Directives | Serial Number. Under the Directive Details the Command (Default/Unix) field is populated with the following script.

echo On Error Resume Next >__TMP__.vbs __NL__ echo strComputer = "." >>__TMP_
_.vbs __NL__ echo Set objWMIService = GetObject("winmgmts:" & "{impersonatio
nLevel=impersonate}!\\" & strComputer & "\root\cimv2") >>__TMP__.vbs __NL__
echo Set colSMBIOS = objWMIService.ExecQuery("Select * from Win32_SystemEncl
osure") >>__TMP__.vbs __NL__ echo For Each objSMBIOS in colSMBIOS >>__TMP__.v
bs __NL__ echo If objSMBIOS.SerialNumber < > "None" Then >>__TMP__.vbs __NL_
_ echo WScript.Echo "Serial Number : " & objSMBIOS.SerialNumber >>__TMP__.vb
s __NL__ echo End If >>__TMP__.vbs __NL__ echo Next >>__TMP__.vbs __NL__ cscr
ipt //Nologo __TMP__.vbs && del __TMP__.vbs

The problem in this script is the query statement ("Select * from Win32_SystemEnclosure").

This will pull the chassis number on Blade Servers.

You can make a copy of the original blueprint and edit the script to query using "win32_BIOS" api, then the query will pull the correct serial number on the Blade servers.

echo On Error Resume Next >__TMP__.vbs __NL__ echo strComputer = "." >>__TMP_
_.vbs __NL__ echo Set objWMIService = GetObject("winmgmts:" & "{impersonatio
nLevel=impersonate}!\\" & strComputer & "\root\cimv2") >>__TMP__.vbs __NL__
echo Set colSMBIOS = objWMIService.ExecQuery("Select * from win32_BIOS")
>>__TMP__.vbs __NL__ echo For Each objSMBIOS in colSMBIOS >>__TMP__.v
bs __NL__ echo If objSMBIOS.SerialNumber < > "None" Then >>__TMP__.vbs __NL_
_ echo WScript.Echo "Serial Number : " & objSMBIOS.SerialNumber >>__TMP__.vb
s __NL__ echo End If >>__TMP__.vbs __NL__ echo Next >>__TMP__.vbs __NL__ cscr
ipt //Nologo __TMP__.vbs && del __TMP__.vbs