External Hard Drive Serial Number

Active1 year, 6 months ago

All other SSD product should be returned to the place of purchase. Enter, scan or copy/paste serial numbers in the box below to check current warranty info. New lines, commas, spaces, colons and semicolons can be used to separate serial numbers. Must use T-S/N serial number for 3.5' desktop drives.

  1. A serial number is a unique number assigned to the hardware by its manufacturer. It is used for identification and inventory purposes. A serial number allows the manufacturer to identify a product and get additional information about it. It may be required for replacement, updating firmware, or for checking compatibility with other hardware.
  2. It’s more of a Windows question and out of the realms of WD Support (unless you registered the My Passport 2TB with them. Then they would be able to provide you with the serial number of the stolen hard drive) personally speaking, accept that it’s gone (as well as the data) and replace it 2TB Passports are cheap to replace.

I am archiving a large number of HDD's at my company, and I have a powershell script that grabs the hostname and user list from a Windows OS installation, and I would like to programatically find the serial number of the drive as well. I have the following bit of Powershell code (mostly completed) that should do this, but there's a complication as well.

I am connecting the drives with a USB HDD dock, and it seems that if the computer is booted with the drive connected internally (via SATA cables, I haven't tested externally yet), then the SerialNumber field is populated. However, if I connect it after the computer has booted up, the SerialNumber field is always blank. Is there a way to have the computer re-scan for this info when I connect the drive, or is this info only gathered at boot-up, for example, by the BIOS or something?

Lacie external hard drive serial numberMachavity
25.4k15 gold badges63 silver badges83 bronze badges
AndrewAndrew

3 Answers

AFAIK the SerialNumber is optional and provided by the driver. So if the USB-dock driver is not providing the information to Windows, then there's no easy way to retrieve it.

Frode F.Frode F.
39.8k7 gold badges63 silver badges88 bronze badges

This thread (look for 'Maxim Shatskih') says that IOCTL_SCSI_PASS_THROUGH is supported by USBSTOR, so it would be possible to write or find a program that can get the serial number from a USB attached drive, by passing the appropriate SCSI command to the drive (get mode page 80h).

A package that may do what you need is sg3_utils for Windows (it was originally written for Linux but ported to Windows).

ΧpẘHardExternal Hard Drive Serial Number

Wd External Hard Drive Serial Number

Χpẘ
2,9721 gold badge7 silver badges19 bronze badges

I just tested booting the computer up with the HDD in the USB dock, and I got the same result. Technically, the SerialNumber field wasn't blank, but was all zero's instead of the actual serial number, which is probably just the same difference. It's seeming like it may be more work than it's worth to do this as a part of the script (assuming it's even possible), so I will likely just continue scanning the SN barcode into the script. It's an extra step, but only takes a couple seconds.

Thanks everyone for the input.

AndrewAndrew

Western Digital

Not the answer you're looking for? Browse other questions tagged powershellwmiget-wmiobject or ask your own question.