How to retrieve Serial Number from Windows on new U/EFI box?

I need to retrieve the hardware serial numbers from a set of new HP mini desktops that need provisioning.

This worked in the past using a WSH script to query it via WMI. Unfortunately, the newer models no longer contain a BIOS but rather come with EFI instead. All known ways of querying the information no longer work.

I've googled the subject quite a bit but all the answers I found recommend the ineffective method above. Can anyone help? I need a solution that will work with XP (embedded) if it makes a difference.


Solution 1:

dmidecode in linux is capable of pulling this information via EFI, there is a port available here http://gnuwin32.sourceforge.net/packages/dmidecode.htm which appears to be compiled after EFI support. The command would dmidecode -s system-serial-number as tested on my BIOS based system, however I'm unable to test fully as I havn't got an EFI system to hand.

Solution 2:

We found out the model we had was a pre-release box, and a serial number hadn't been assigned yet. Once trying it on a newer box, it worked just fine. The value was available via WMI after all.

Nothing to see here, move along. ;)

Scripting examples in the language of your choice to print serial numbers can be found at Microsoft TechNet.