Retrieving type and serial number from Lenovo machines through WMI
If you need to the type and serial number of a Lenovo ThinkPad or ThinkCentre, use these two quick WMI commands:
C:\Windows\system32>wmic /node:"HOST" bios get serialnumber
SerialNumber
L3BXXXXX
C:\Windows\system32>wmic /node:"HOST" baseboard get product
Product
646065G
Replace HOST with the hostname of the machine you want to check on. The ” ” are important, so don’t leave them out.

Victor:
Thanks, it works fine. But how to detect if HMC card is present on the current system?
2. November, 2007, 18:20dag:
wmic bios get serialnumber
14. April, 2008, 03:11works great for me, but it retrieves extra chars that are not whitespace appended to the end of the string. any ideas how to get rid of this?
Jay:
Works like a charm! THANK YOU!
12. November, 2008, 19:45