Following another thread, I read that wmic diskdrive get serialnumber in cmd would produce the serial number for the hdd installed.

I'm getting a message:

Code = 0x80041017
Description = Invalid query

Is there another command or another way of getting the serial number (all I want to do is order a duplicate HDD) without physically going to the server? This is a Windows Server 2003.

  • Serial numbers do not include model number or things like that, it's just a number which uniquely identifies the device to the vendor.
    – Abraxas
    Feb 17, 2016 at 0:17
  • Ok, so how do I get the model number?
    – awoitte
    Feb 17, 2016 at 0:17
  • @awoitte wmic diskdrive get model
    – DavidPostill
    Feb 17, 2016 at 0:18
  • Most programs like Speccy provide information on the HDD.
    – Ramhound
    Feb 17, 2016 at 0:20
  • @awoitte Are you running as Admin?
    – DavidPostill
    Feb 17, 2016 at 0:21

1 Answer 1



wmic path win32_physicalmedia get SerialNumber

or in PowerShell:

Get-WmiObject Win32_PhysicalMedia | Format-Table Tag, SerialNumber

But, as mentioned in the comments, this will only get you the serial number, not the model. If you want the make/model try the following:

wmic path win32_physicalmedia get SerialNumber, Model, Manufacturer, SKU, ParNumber

Hopefully that will give you some, it depends on what they registered in the class. More options of the Win32_PhysicalMedia class can be found here: https://msdn.microsoft.com/en-us/library/windows/desktop/aa394346(v=vs.85).aspx

Adding @DavidPostill 's suggestion as well:

wmic diskdrive get model

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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