Link to home
Create AccountLog in
Windows OS

Windows OS

--

Questions

--

Followers

Top Experts

Avatar of aj advt
aj advt🇮🇳

Harddisk serial number

How can I get the harddrive serial number without opening the cabinet?

 

Thank you

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Daniel Pineault (Microsoft MVP)Daniel Pineault (Microsoft MVP)🇨🇦

Depends the approach you wish to take, but PowerShell can easily do this.  Try running:

 

Get-PhysicalDisk | Select-Object FriendlyName, SerialNumber

Open in new window

 

If you're not a PS person and are more comfortable with VBA, then look at the code from: https://www.devhut.net/getting-the-hard-drive-serial-number-with-vba/ 


Avatar of rindirindi🇨🇭

This depends on many things. What is the disk connected to & how? Is it connected to a server via a RAID controller? If yes, the controller will hide the details of the disk, to the OS, but the controller's setup tool should show you the details of the disk.


Also at a Command Prompt:

 

wmic diskdrive get model,serialNumber,size,mediaType

Open in new window

 

Includes model and size of all attached drives so you can determine which is the one you're interested in


Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Since you selected the MacOS topic - from a terminal window:

 

system_profiler SPHardwareDataType | awk '/Serial/ {print $4}'


Good catch Gerwin!  I didn't even see that tag since it hidden from view.

 

You could also try:

 

ioreg -rd1 -w0 -c AppleAHCIDiskDriver | grep Serial


on a mac you also have lspci and/or smartmontools which both can also provide that info. geom might also be available. all of the above require root privileges.

 

EDIT : typo : s/mich/might/


Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of bbaobbao🇦🇺

using PowerShell:

Get-WmiObject win32_physicalmedia | Format-List Tag,SerialNumber

Open in new window

FYI -

https://winaero.com/find-hard-disk-serial-number-windows-10/

Avatar of aj advtaj advt🇮🇳

ASKER

THIS DOS COMMAND LOOKS VERY HELPFUL FOR ME

 

THANK YOU

    MASQ


WMIC isn't PowerShell and only works with Windows systems.

Because you've selected both Windows AND Mac OS X as topics for yor question you've got solutions that work with all of these.


Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


@aj - Do you need further help with this? If not then you can select the comment(s) that answer your question by ticking the Solution box at those comment(s). Thank you!


This question needs an answer!
Looks like this question is still being worked on. Think you can help?
Create your account and start contributing!
Create Account
Windows OS

Windows OS

--

Questions

--

Followers

Top Experts

This topic area includes legacy versions of Windows prior to Windows 2000: Windows 3/3.1, Windows 95 and Windows 98, plus any other Windows-related versions including Windows Mobile.