Obtaining Hard Drive serial number in windows server 2003

1

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:

ERROR:
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.

windows
hard-drive
windows-server-2003
asked on Super User Feb 17, 2016 by awoitte • edited Feb 17, 2016 by techraf

1 Answer

3

Try:

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
answered on Super User Feb 17, 2016 by Abraxas • edited Feb 17, 2016 by Abraxas

User contributions licensed under CC BY-SA 3.0