Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.77k stars 516 forks source link

Lenovo devices report incorrect serial numbers, suggest using wmic to retrieve #3053

Open kevinh-csalabs opened 2 years ago

kevinh-csalabs commented 2 years ago

We've noticed that Lenovo devices (and possibly others) report incorrect serial number information.

I haven't looked into how this is retrieved, but the values returned via "wmic bios get serialnumber" is correct. Can that be used for querying with the current method as a fallback since the wmic data seems to be more reliable?

krayon007 commented 2 years ago

It currently already uses WMIC to retrieve the value. It gets it from WMIC BASEBOARD GET. It uses that, because when I triple-boot my mac, with MacOS, Windows, and linux, this value returned from this field matches the field returned from DMI in linux and IOPlatformSerialNumber in MacOS. I can do some more testing to see which values the one you specified matches with in macOS and Linux.

kevinh-csalabs commented 2 years ago

@krayon007

Ok, so I can confirm some models are returning motherboard information or other data instead of serialnumber, even though it is under a serial number column. Here is an example from an HP Pavilion - 15-cs0058od: image

I'm seeing this with Lenovo Think Pad T460s as well: image

(Serial number should start with "PC")

Unofficially Microsoft suggests using the wmic bios for this, though I have seen it come back blank before. https://support.microsoft.com/en-us/topic/how-to-find-computer-serial-number-7ceeffe0-1028-840e-dce9-d41634d54cff

Known issue from Lenovo (suggests patching bios, but not always feasible remotely: https://support.lenovo.com/us/en/solutions/ht503734-incorrect-serial-number-reported-when-running-wmic-command-lenovo-v510-14ikb15ikb

krayon007 commented 2 years ago

Ok, I have a few Lenovo Laptops, so I can check this out, and see if there's a way to determine at run time which field to use.

kevinh-csalabs commented 2 years ago

Thanks Bryan! We have a few Lenovos that are reporting correctly and most HP are correct, but some are wrong, so it seems to be a mixed bag.