lanman777
asked on
Need to find server serial number with VBScript
The following script works great on Dell servers to return tag/serial number information.
How do I use a similar script to get the serial number of HP Proliant DL380 servers?
How do I use a similar script to get the serial number of HP Proliant DL380 servers?
Dim strComputer, objWMIService, colItems, objItem
strComputer = InputBox("Please enter the computer name or IP Address of a Dell machine:","Computer Name or IP Address")
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_BIOS",,48)
For Each objItem In colItems
MsgBox "Dell Service Tag: " & objItem.SerialNumber
Next
MsgBox "Finished"
If you have loets of HP server I recommend you to setup HP CMS which can do amazing things for you.You can run reports about hardware and find any failed hardware and lot more.
Similar question
https://www.experts-exchange.com/questions/21758478/Server-serial-number.html?sfQueryTermInfo=1+number+serial+server
Similar question
https://www.experts-exchange.com/questions/21758478/Server-serial-number.html?sfQueryTermInfo=1+number+serial+server
ASKER
I think what I am looking for is a return on this "chassisserialnumber" via VBScript.
However, have not been able to get this parameter to successfully return
the serial number of the Proliant DL380 server.
However, have not been able to get this parameter to successfully return
the serial number of the Proliant DL380 server.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You might also try getting the asset tag, I know this works for Dell, and HP.....
Use the same code you posted above, changing Win32_BIOS to "Win32_SystemEnclosure" and change
objItem.SerialNumber to objItem.SMBIOSAssetTag. Asset tags are not always included, but they tend to show up on Dells.