Windows OS
--
Questions
--
Followers
Top Experts
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.
Depends the approach you wish to take, but PowerShell can easily do this. Try running:
Get-PhysicalDisk | Select-Object FriendlyName, SerialNumber
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/
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
Includes model and size of all attached drives so you can determine which is the one you're interested in






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/

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.
Get-WmiObject win32_physicalmedia | Format-List Tag,SerialNumber
FYI - https://winaero.com/find-hard-disk-serial-number-windows-10/
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.






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!
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.
Create your account and start contributing!