Wmic Diskdrive Get Serialnumber

Sometimes you need to quickly find the interface through which your storage is connected inside your PC, and its serial number and a set of other properties. With a single console command you can retrieve a lot of information about your disk drive. Let's see how it can be done.

RECOMMENDED: Click here to fix Windows errors and optimize system performance

Business license shelby county alabama tax assessor. Regardless, if you need an Alabama, Shelby County business license, you must be doing something right.Unfortunately, when it comes down to it, getting a business license in the State of Alabama can quickly turn excitement and promise into confusion and frustration. Maybe you're looking to open a new business, expand an existing business or just get a business license. With multiple levels of government and so many different requirements, obtaining business licenses can be overwhelming.Why spend your time chasing down requirements when you can figure it all out in one place? This must be an exciting time for you.


  • But if I use WMI (just quickly from command line using 'wmic diskdrive get serialnumber' for now OR using say WMI Explorer) it shows it as:-000020 e.g. Last digit different? Powershell command of 'get-disk select serialnumber' Also shows it as 000020. Getting it from USB controller using something like below.
  • Get serial number for RAM, motherboard, hard disk. This post explains how to find serial number for various hardware devices – RAM, Hard disk, Motherboard on a computer. wmic diskdrive get serialnumber SerialNumber FR3AG13032430BC13S Get serial number for mother boards wmic baseboard get serialnumber.
  • WMIC or Windows Management Interface Command is a simple command line tool used to issue WMI commands. WMI command generally used to query all of the system related information like Computer Name, BIOS Serial Number, Mac Address etc.

WINDOWS TIP: WMIC Command cheat sheet. I’m not a huge fan of powershell, it always seems to not have installed what I want, there is no doubt however that the WMIC command line is a powerful tool if you need to find out about the underlying OS. This Cheat sheet covers most (if not all) of the useful commands you’ll need to get yourself aquainted. Short for 'WMI console,' wmic is a command line command to query WMI (Windows Management Instrumentation) entries. Note Beginning in 2012, WMIC is deprecated in favor of PowerShell cmdlets which perform equivalent CIM operations, such as get-wmiobject, invoke-wmimethod, Get-wmiobject, and gwmi.

There is a special WMIC command which utilizes Windows Management Instrumentation (WMI) to provide information about all storage devices you have installed in Windows. It works in all modern Windows versions including Windows 10. You can use it as follows.
  1. Open a new instance of the command prompt.
  2. Type or copy-paste the following command:

    It will give you information about the storage devices you have. This is usually not visible without third party tools.

In my case, the output is as follows:The full list of properties that you can use for the query above is as follows:

  • Availability
  • BytesPerSector
  • Capabilities
  • CapabilityDescriptions
  • Caption
  • CompressionMethod
  • ConfigManagerErrorCode
  • ConfigManagerUserConfig
  • CreationClassName
  • DefaultBlockSize
  • Description
  • DeviceID
  • ErrorCleared
  • ErrorDescription
  • ErrorMethodology
  • FirmwareRevision
  • Index
  • InstallDate
  • InterfaceType
  • LastErrorCode
  • Manufacturer
  • MaxBlockSize
  • MaxMediaSize
  • MediaLoaded
  • MediaType
  • MinBlockSize
  • Model
  • Name
  • NeedsCleaning
  • NumberOfMediaSupported
  • Partitions
  • PNPDeviceID
  • PowerManagementCapabilities
  • PowerManagementSupported
  • SCSIBus
  • SCSILogicalUnit
  • SCSIPort
  • SCSITargetId
  • SectorsPerTrack
  • SerialNumber
  • Signature
  • Size
  • Status
  • StatusInfo
  • SystemCreationClassName
  • SystemName
  • TotalCylinders
  • TotalHeads
  • TotalSectors
  • TotalTracks
  • TracksPerCylinder

You can find their descriptions at the following MSDN page: Win32_DiskDrive.

Wmic Diskdrive Get Serialnumber

WMIC is a really useful tool to perform WMI queries in Windows. Here are a few more examples of such queries:

  • Get all network adapter details in Windows 10 with this command.
Wmic Diskdrive Get Serialnumber

That's it.

RECOMMENDED: Click here to fix Windows errors and optimize system performance

Active5 years, 2 months ago

I want to read the name and the serialnumber of my Hard-Drives.

Download paragon backup free. I stumbled upon wmic but i'm having troubles. I guess these two commands should do the trick, but I only get the message:

or

I tried the following aswell:

Any ideas on what I'am doing wrong?

Solution:

Thanks JPBlanc,via the /? command i've found out that SerialNumber doesn't even exist. I now use

which gives the correct result.

Paul Hiemstra
50.4k10 gold badges118 silver badges136 bronze badges
user1210404user1210404

3 Answers

You are just making a mistake usin WMIC command line, WMIC DISKDRIVE GET SerialNumber /Format /? gives you keywords:

you can try :

You can replace RAWXML by one of the others formats.

JPBlancJPBlanc
55.2k11 gold badges101 silver badges136 bronze badges

this issue occurs because the XML parser treats the control characters that are included in the serial number of some drives as invalid.

juejue

I was getting this error on Windows 7 x86 Pro (where querying the serial number should be possible) when an external drive was connected.

Wmic Diskdrive Get Serialnumber Online

This is how I fixed it:

  1. Get the ID of each drive: wmic diskdrive get deviceid /format:list

  2. Parse the output and get the first ID. In my case this was.PHYSICALDRIVE0

  3. Escape the backslashes so that the ID is .PHYSICALDRIVE0

  4. Get the serial number of the drive using its escaped ID:

    wmic diskdrive where deviceid='.PHYSICALDRIVE0' getserialnumber /format:list

  5. Repeat steps 2 - 4 until you have the serial numbers of all drives

Edit: The above doesn't work on my copy of Windows XP x86 Pro.

This does:

Matthias BraunMatthias Braun

Wmic Diskdrive Get Serialnumber Windows 7

16.2k12 gold badges89 silver badges125 bronze badges

Wmic Diskdrive Get Serialnumber Code

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